Function
Class FiniteAbelianFunction

java.lang.Object
  extended by Function.Function
      extended by Function.FiniteAbelianFunction

public abstract class FiniteAbelianFunction
extends Function

An abstract extension to class Function, for describing functions over a finite Abelian group G → C.

Author:
Elizabeth Firman and Ariel Stolerman

Constructor Summary
FiniteAbelianFunction(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

FiniteAbelianFunction

public FiniteAbelianFunction(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 finite Abelian group described by (gj,Nj) j=1,...,k, the domain of the function. In each G[i], the first coordinate is the generator and the second coordinate is its order.
Throws:
FunctionException - If one of the given G-values is less than or equals to 0 or one of the generators is not in range.
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.

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.

Specified by:
calcEuclideanNorm in class Function
Returns:
The infinity 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.