|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.memphis.ccrg.lida.episodicmemory.sdm.BitVectorUtils
public class BitVectorUtils
Utilities for BitVector
Constructor Summary | |
---|---|
BitVectorUtils()
Instantiates a new bit vector utils. |
Method Summary | |
---|---|
static int[] |
denormalizeVector(cern.colt.bitvector.BitVector[] weights)
Denormalize vector. |
static cern.colt.bitvector.BitVector[] |
discretizeIntVector(int[] buff,
int bitSteps)
Discretize int vector. |
static cern.colt.bitvector.BitVector |
getRandomVector(int s)
|
static int |
hamming(cern.colt.bitvector.BitVector addr,
cern.colt.bitvector.BitVector hardLoc)
Calculates the Hamming distances between two address. |
static cern.colt.bitvector.BitVector |
multiplyVectors(cern.colt.bitvector.BitVector a,
cern.colt.bitvector.BitVector b)
Multiply vectors. |
static cern.colt.bitvector.BitVector |
noisyVector(cern.colt.bitvector.BitVector original,
int noise)
Returns a noisyVector |
static cern.colt.bitvector.BitVector |
normalizeVector(int[] buff)
Normalize vector. |
static cern.colt.bitvector.BitVector |
substractVectors(cern.colt.bitvector.BitVector a,
cern.colt.bitvector.BitVector b)
Substract vectors. |
static int[] |
subtractVectors(int[] a,
cern.colt.bitvector.BitVector v)
Subtracts vectors. |
static int[] |
sumVectors(int[] accum,
cern.colt.bitvector.BitVector v)
Adds BitVector v to int[] accum, first converting the bits of v with value 0 to -1. |
static int[] |
sumVectors(int[] accum,
int[] vector)
Sum vectors. |
static int[] |
vectorToBipolar(cern.colt.bitvector.BitVector v)
Vector to bipolar. |
static int[] |
vectorToBipolar(int[] accum,
cern.colt.bitvector.BitVector v)
Vector to bipolar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitVectorUtils()
Method Detail |
---|
public static cern.colt.bitvector.BitVector getRandomVector(int s)
s
- The size of the new vector
public static int hamming(cern.colt.bitvector.BitVector addr, cern.colt.bitvector.BitVector hardLoc)
addr
- the addrhardLoc
- the hard loc
public static cern.colt.bitvector.BitVector noisyVector(cern.colt.bitvector.BitVector original, int noise)
original
- original vectornoise
- number of noisy bits to introduce
public static int[] sumVectors(int[] accum, cern.colt.bitvector.BitVector v)
accum
- the accumulation array.v
- the vector to add
public static cern.colt.bitvector.BitVector substractVectors(cern.colt.bitvector.BitVector a, cern.colt.bitvector.BitVector b)
a
- the ab
- the b
public static int[] subtractVectors(int[] a, cern.colt.bitvector.BitVector v)
a
- the av
- the v
public static int[] sumVectors(int[] accum, int[] vector)
accum
- the accumvector
- the vector
public static int[] vectorToBipolar(int[] accum, cern.colt.bitvector.BitVector v)
accum
- the accumv
- the v
public static int[] vectorToBipolar(cern.colt.bitvector.BitVector v)
v
- the v
public static cern.colt.bitvector.BitVector normalizeVector(int[] buff)
buff
- the buff
public static cern.colt.bitvector.BitVector multiplyVectors(cern.colt.bitvector.BitVector a, cern.colt.bitvector.BitVector b)
a
- the ab
- the b
public static cern.colt.bitvector.BitVector[] discretizeIntVector(int[] buff, int bitSteps)
buff
- the buffbitSteps
- the bit steps
public static int[] denormalizeVector(cern.colt.bitvector.BitVector[] weights)
weights
- the weights
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |