Class PCode

java.lang.Object
  |
  +--PCode

public class PCode
extends java.lang.Object

Author:
Erhan Oztop, 2001-2002

Source code by Erhan Oztop (erhan@atr.co.jp)
Copyright August 2002 via
University of Southern California Ph.D. publication copyright
This class keeps and array of doubles o represent the cell activity of a region.

Field Summary
 int actualsize
           
 java.lang.String[] comment
           
(package private) static double def_max
           
(package private) static double def_min
           
(package private) static double def_var
           
 int dim
           
 int[] dimpager
           
 int[] dimsize
           
 double[] elig
           
 int[] end
           
 double[] firing
           
 java.lang.String layercomment
           
 java.lang.String layername
           
 int layersize
           
 double[] max
           
static int maxDIM
           
 double[] min
           
 java.lang.String[] name
           
 double[] prec
           
 double[] prob
           
 int[] start
           
 double[][] synapse
           
(package private)  int synapseC
           
 double[] var
           
 
Constructor Summary
PCode()
           
PCode(java.lang.String lname, int lsize, java.lang.String lcomment)
           
 
Method Summary
 void addDimension(java.lang.String name, double min, double max, int size, double var, java.lang.String comment)
           
 void addDimension(java.lang.String name, int size)
           
 double Cdist(int C1, int C2)
          returns the euclidian distance between the points [encoded] C1 and C2
 double CIXdist(int[] IX1, int C2)
          returns the euclidian distance between the points IX1 and [encoded] C2
 double CIXdist(int C2, int[] IX1)
          returns the euclidian distance between the points IX1 and [encoded] C2
private  int compressIX(int[] IX)
           
 double[] decode(int C)
          Reads off the vector valued coarse coding.
 double[] decode(int[] IX)
          this is wrong! Have to be local summing! How do you get double peaks workg?
private  int[] decompressIX(int C)
           
 double elementAt(int i0)
           
 double elementAt(int[] i)
           
 double elementAt(int i1, int i0)
           
 double elementAt(int i2, int i1, int i0)
           
 double elementAt(int i3, int i2, int i1, int i0)
           
 int encode(double[] value, double[] confidence)
           
 Point3d[] getAdvAvgSheet01(Motor m, int callback)
          this is OK
 double[][] getAvgSheet01()
          this ok
 double[][] getAvgSheet02()
           
 double getFiring(int[] IX)
           
 double[][] getSheet01(int i2)
          fix as above OKs
 double IXdist(int[] IX1, int[] IX2)
          returns the euclidian distance between the points IX1 and IX2
static void main(java.lang.String[] argv)
           
 void makeSynapse(int howmany)
          Creates howmany multiplicative synapses (cache vectors to be multiplied)
 void mergeSynapse()
          Multiply the synaptic probabilities to get the net probability
private  int offset(int[] i)
           
 double[] pref_value(int lc)
           
 double[] pref_value(int[] IX)
          This defines the distrubtion of preferred values.
 void setEncodingVar(double v)
           
 void setEncodingVar(double[] v)
          WARNING: only v[0] is used/ need to modify encode/decode stuff!!
 void setFiring(int[] IX, double val)
           
 void setfiring(int ix, double val)
           
 void setGaussBall(int C, double var2)
           
 void setTombStone(int C)
           
 void setTombStone(int[] addr)
           
 void setTombStone(int C, double ignore)
           
 void show01(Motor m, int callback)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

maxDIM

public static int maxDIM

layername

public java.lang.String layername

layercomment

public java.lang.String layercomment

layersize

public int layersize

actualsize

public int actualsize

dim

public int dim

dimsize

public int[] dimsize

dimpager

public int[] dimpager

name

public java.lang.String[] name

comment

public java.lang.String[] comment

min

public double[] min

max

public double[] max

prec

public double[] prec

start

public int[] start

end

public int[] end

var

public double[] var

firing

public double[] firing

elig

public double[] elig

prob

public double[] prob

synapse

public double[][] synapse

synapseC

int synapseC

def_min

static final double def_min

def_max

static final double def_max

def_var

static final double def_var
Constructor Detail

PCode

public PCode()

PCode

public PCode(java.lang.String lname,
             int lsize,
             java.lang.String lcomment)
Method Detail

elementAt

public double elementAt(int i0)

elementAt

public double elementAt(int i1,
                        int i0)

elementAt

public double elementAt(int i2,
                        int i1,
                        int i0)

elementAt

public double elementAt(int i3,
                        int i2,
                        int i1,
                        int i0)

elementAt

public double elementAt(int[] i)

getAvgSheet02

public double[][] getAvgSheet02()

getAdvAvgSheet01

public Point3d[] getAdvAvgSheet01(Motor m,
                                  int callback)
this is OK

getAvgSheet01

public double[][] getAvgSheet01()
this ok

getSheet01

public double[][] getSheet01(int i2)
fix as above OKs

show01

public void show01(Motor m,
                   int callback)

offset

private int offset(int[] i)

addDimension

public void addDimension(java.lang.String name,
                         int size)

addDimension

public void addDimension(java.lang.String name,
                         double min,
                         double max,
                         int size,
                         double var,
                         java.lang.String comment)

pref_value

public double[] pref_value(int[] IX)
This defines the distrubtion of preferred values. Currently the distribution is linear

pref_value

public double[] pref_value(int lc)

decode

public double[] decode(int C)
Reads off the vector valued coarse coding.

decode

public double[] decode(int[] IX)
this is wrong! Have to be local summing! How do you get double peaks workg?

compressIX

private int compressIX(int[] IX)

decompressIX

private int[] decompressIX(int C)

encode

public int encode(double[] value,
                  double[] confidence)

IXdist

public double IXdist(int[] IX1,
                     int[] IX2)
returns the euclidian distance between the points IX1 and IX2

Cdist

public double Cdist(int C1,
                    int C2)
returns the euclidian distance between the points [encoded] C1 and C2

CIXdist

public double CIXdist(int[] IX1,
                      int C2)
returns the euclidian distance between the points IX1 and [encoded] C2

CIXdist

public double CIXdist(int C2,
                      int[] IX1)
returns the euclidian distance between the points IX1 and [encoded] C2

setfiring

public void setfiring(int ix,
                      double val)

setFiring

public void setFiring(int[] IX,
                      double val)

getFiring

public double getFiring(int[] IX)

setTombStone

public void setTombStone(int C,
                         double ignore)

setTombStone

public void setTombStone(int C)

setTombStone

public void setTombStone(int[] addr)

setGaussBall

public void setGaussBall(int C,
                         double var2)

makeSynapse

public void makeSynapse(int howmany)
Creates howmany multiplicative synapses (cache vectors to be multiplied)

mergeSynapse

public void mergeSynapse()
Multiply the synaptic probabilities to get the net probability

main

public static void main(java.lang.String[] argv)

setEncodingVar

public void setEncodingVar(double v)

setEncodingVar

public void setEncodingVar(double[] v)
WARNING: only v[0] is used/ need to modify encode/decode stuff!!