SFT
Class SFTUtils

java.lang.Object
  extended by SFT.SFTUtils

public class SFTUtils
extends java.lang.Object


Nested Class Summary
static class SFTUtils.DiffFunction
          Class for calculating a difference function for two given functions f1, f2 s.t.
static class SFTUtils.FullMapFunction
          class for creating a function from a given mapping of elements to their function values
static class SFTUtils.ResultFunction
          class for creating a function from the results of the SFT algorithm.
 
Constructor Summary
SFTUtils()
           
 
Method Summary
static int[] calcLogG(long[] G)
           
static int calcLogN(long N)
           
static Complex chi(int t, long[] G, long[] v, long[] y)
          calculate Chi over G
static Complex chi(long N, long v, long y)
          calculate Chi over Z_N
static long[] getVectorFromString(java.lang.String vector)
           
static java.lang.String vectorToString(long[] elem)
           
static java.lang.String vectorToString(java.lang.Long[] Elem)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFTUtils

public SFTUtils()
Method Detail

vectorToString

public static java.lang.String vectorToString(long[] elem)
Parameters:
elem - vector to print in format (x1,...,xk)
Returns:
string representation of the vector

vectorToString

public static java.lang.String vectorToString(java.lang.Long[] Elem)

getVectorFromString

public static long[] getVectorFromString(java.lang.String vector)
Parameters:
vector - the string representation of a vector, as created by printVector
Returns:
the long array representing the vector

calcLogG

public static int[] calcLogG(long[] G)
Parameters:
G - an integer array describing the group Z_N1 X ... X Z_Nk
Returns:
an integer array of log_2(Ni), rounded up, for i in {1,...,k}

calcLogN

public static int calcLogN(long N)
Parameters:
N - describing Z_N
Returns:
log_2(N), rounded up

chi

public static Complex chi(int t,
                          long[] G,
                          long[] v,
                          long[] y)
calculate Chi over G

Parameters:
t - the size of the vector to look at for the calculation
G - vector of values describing G, i.e. Cartesian multiplication of Z_Ni
v - the vector of elements in G defining the chi function
y - input vector for the chi function
Returns:
chi_(v)[y] = chi_(alpha_1,...,alpha_k)[y_1,...,y_k]

chi

public static Complex chi(long N,
                          long v,
                          long y)
calculate Chi over Z_N

Parameters:
N - describing Z_N
v - the element in Z_N defining the chi function
y - input for the chi function
Returns:
chi_(v)[y]