Function
Class DirectProdFunction

java.lang.Object
  extended by Function.Function
      extended by Function.DirectProdFunction
Direct Known Subclasses:
FourierPolynomial, SFTUtils.DiffFunction, SFTUtils.FullMapFunction, SFTUtils.ResultFunction, XMLFourierPolynomial

public abstract class DirectProdFunction
extends Function

An abstract extension to class Function, for describing functions over ZN1 x ... x ZNk → C.

Author:
Elizabeth Firman and Ariel Stolerman

Constructor Summary
DirectProdFunction(long[] G)
          Constructs a function object over G -> C for the given parameter G.
 
Method Summary
 double calcEuclideanNorm()
          Returns the Euclidean norm of this function over G.
 double calcInfinityNorm()
          Returns the infinity norm of this function over G.
 long[] getG()
          Returns the vector of values describing G, the domain of the function.
abstract  Complex getValue(long[] elem)
          Returns the value of the function for the input element in G.
 void setG(long[] G)
          Sets G to a new value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectProdFunction

public DirectProdFunction(long[] G)
                   throws FunctionException
Constructs a function object over G -> C for the given parameter G.

Parameters:
G - A vector of values describing G, i.e. a Cartesian multiplication of Z_Ni, the domain of the function.
Throws:
FunctionException - If one of the given G-values is less than or equals to 0.
Method Detail

getValue

public abstract Complex getValue(long[] elem)
Returns the value of the function for the input element in G.

Parameters:
elem - The element whose this function's value is calculated.
Returns:
The value of the function for the input element in G.

calcInfinityNorm

public double calcInfinityNorm()
Returns the infinity norm of this function over G. The implementation given in the abstract class is the naive implementation.

Specified by:
calcInfinityNorm in class Function
Returns:
The infinity norm of this function over G.

calcEuclideanNorm

public double calcEuclideanNorm()
Returns the Euclidean norm of this function over G. The implementation given in the abstract class is the naive implementation.

Specified by:
calcEuclideanNorm in class Function
Returns:
The Euclidean norm of this function over G.

getG

public long[] getG()
Returns the vector of values describing G, the domain of the function.

Returns:
The vector of values describing G, the domain of the function.

setG

public void setG(long[] G)
          throws FunctionException
Sets G to a new value.

Parameters:
G - The vector of values describing G, the domain of the function
Throws:
FunctionException - If the one of the given values is less than or equals to 0.