edu.wlu.cs.levy.RAAM
Class IFSDecoder

java.lang.Object
  |
  +--edu.wlu.cs.levy.RAAM.IFSDecoder

public class IFSDecoder
extends java.lang.Object

IFSDecoder is a class supporting multi-dimensional IFS attractor and tree computations by Monte-Carlo sampling. Based on

@PhdThesis{LevyThesis,
  author =          {S.D. Levy},
  title =           {Infinite RAAM: Initial Explorations into a Fractal 
                     Basis for Cognition},
  school =          {Brandeis University},
  year =            {2002},
  address =         {Waltham, Mass.},
 }
  

Since:
JDK1.2

Constructor Summary
IFSDecoder(double[][] w)
          Creates an IFSDecoder, using K x (D^2+D) array of IFS transform weights, where K is # of transforms, D is # of dimensions.
IFSDecoder(double[][] w, double[] b)
          Creates an IFSDecoder using weights and biases.
IFSDecoder(double[] w, int k)
          Creates an IFSDecoder using one-dimensional array of weights.
IFSDecoder(edu.wlu.cs.levy.RAAM.RAAM raam)
          Construct decoder from RAAM network.
 
Method Summary
 double[][] getAttractor(int m, int n)
          Returns attractor points as array.
 double[][] getAttractor(int m, int n, long seed)
          Returns attractor points as array.
 double[][] getAttractor(int m, int n, java.util.Random r)
          Returns attractor points as array.
 edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m, int n, double e)
          Returns array of M trees by Monte Carlo sampling in [0,N)^D.
 edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m, int n, double e, long seed)
          Returns array of M trees by Monte Carlo sampling in [0,N)^D.
 edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m, int n, double e, java.util.Random r)
          Returns array of M trees by Monte Carlo sampling in [0,N)^D.
 edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m, int n, edu.wlu.cs.levy.RAAM.Vectionary d, double e)
          Returns array of M trees by Monte Carlo sampling in [0,N)^D.
 edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m, int n, edu.wlu.cs.levy.RAAM.Vectionary d, double e, long seed)
          Returns array of M trees by Monte Carlo sampling in [0,N)^D.
 edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m, int n, edu.wlu.cs.levy.RAAM.Vectionary d, double e, java.util.Random r)
          Returns array of M trees by Monte Carlo sampling in [0,N)^D.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IFSDecoder

public IFSDecoder(double[][] w,
                  double[] b)
Creates an IFSDecoder using weights and biases. (Simon's preference) Weights array should have D rows and K*D columns, where D is the number of dimensions and K the number of transforms. Bias vector should have K*D elements.

Parameters:
w - weights
b - biases

IFSDecoder

public IFSDecoder(double[] w,
                  int k)
Creates an IFSDecoder using one-dimensional array of weights. (Anthony's preference) Weights are linearized by read Pollack-style IFS weights one transform at a time.

Parameters:
w - linearized IFSDecoder weights
k - number of IFSDecoder transforms

IFSDecoder

public IFSDecoder(double[][] w)
Creates an IFSDecoder, using K x (D^2+D) array of IFS transform weights, where K is # of transforms, D is # of dimensions. (Pollack's preference) Weights are linearized by taking Pollack-style rectangular weights array and reading top to bottom, left to right.

Parameters:
w - IFS transform weights

IFSDecoder

public IFSDecoder(edu.wlu.cs.levy.RAAM.RAAM raam)
Construct decoder from RAAM network.

Parameters:
raam - RAAM network
Method Detail

getAttractor

public double[][] getAttractor(int m,
                               int n,
                               java.util.Random r)
Returns attractor points as array. Uses Monte Carlo sampling of attractor approximations, starting with the unit hypercube. In general this isn't of much use for more than three dimensions, because of the difficulty of visualizing high-dimensional objects.

Parameters:
m - number of sample points
n - number of IFS iterations
r - random-number generator
Returns:
MxD array of M D-dimensional attractor points

getAttractor

public double[][] getAttractor(int m,
                               int n,
                               long seed)
Returns attractor points as array. Uses Monte Carlo sampling of attractor approximations, starting with the unit hypercube. In general this isn't of much use for more than three dimensions, because of the difficulty of visualizing high-dimensional objects.

Parameters:
m - number of sample points
n - number of IFS iterations
seed - seed for random-number generator
Returns:
MxD array of M D-dimensional attractor points

getAttractor

public double[][] getAttractor(int m,
                               int n)
Returns attractor points as array. Uses Monte Carlo sampling of attractor approximations, starting with the unit hypercube. In general this isn't of much use for more than three dimensions, because of the difficulty of visualizing high-dimensional objects.

Parameters:
m - number of sample points
n - number of IFS iterations
Returns:
MxD array of M D-dimensional attractor points

getTrees

public edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m,
                                            int n,
                                            edu.wlu.cs.levy.RAAM.Vectionary d,
                                            double e,
                                            java.util.Random r)
                                     throws java.lang.RuntimeException
Returns array of M trees by Monte Carlo sampling in [0,N)^D.

Parameters:
m - number of points to sample
n - number of IFS iterations (= max tree depth)
d - dictionary for labeling points
e - epsilon distance from dictionary entries
r - random-number generator
Returns:
array of unique trees
java.lang.RuntimeException

getTrees

public edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m,
                                            int n,
                                            edu.wlu.cs.levy.RAAM.Vectionary d,
                                            double e,
                                            long seed)
                                     throws java.lang.RuntimeException
Returns array of M trees by Monte Carlo sampling in [0,N)^D.

Parameters:
m - number of points to sample
n - number of IFS iterations (= max tree depth)
d - dictionary for labeling points
e - epsilon distance from dictionary entries
seed - seed for random-number generator
Returns:
array of unique trees
java.lang.RuntimeException

getTrees

public edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m,
                                            int n,
                                            edu.wlu.cs.levy.RAAM.Vectionary d,
                                            double e)
                                     throws java.lang.RuntimeException
Returns array of M trees by Monte Carlo sampling in [0,N)^D.

Parameters:
m - number of points to sample
n - number of IFS iterations (= max tree depth)
d - dictionary for labeling points
e - epsilon distance from dictionary entries
Returns:
array of unique trees
java.lang.RuntimeException

getTrees

public edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m,
                                            int n,
                                            double e,
                                            java.util.Random r)
                                     throws java.lang.RuntimeException
Returns array of M trees by Monte Carlo sampling in [0,N)^D. Trees terminate in default terminal 'X'.

Parameters:
m - number of points to sample
n - number of IFS iterations (= max tree depth)
e - epsilon distance from attractor
r - random-number generator
Returns:
array of unique trees
java.lang.RuntimeException

getTrees

public edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m,
                                            int n,
                                            double e,
                                            long seed)
                                     throws java.lang.RuntimeException
Returns array of M trees by Monte Carlo sampling in [0,N)^D. Trees terminate in default terminal 'X'.

Parameters:
m - number of points to sample
n - number of IFS iterations (= max tree depth)
e - epsilon distance from dictionary entries
seed - seed for random-number generator
Returns:
array of unique trees
java.lang.RuntimeException

getTrees

public edu.wlu.cs.levy.RAAM.Tree[] getTrees(int m,
                                            int n,
                                            double e)
                                     throws java.lang.RuntimeException
Returns array of M trees by Monte Carlo sampling in [0,N)^D. Trees terminate in default terminal 'X'.

Parameters:
m - number of points to sample
n - number of IFS iterations (= max tree depth)
e - epsilon distance from attractor
Returns:
array of unique trees
java.lang.RuntimeException