|
||||||||||
| 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()
|
|
| Method Summary | |
|---|---|
static cern.colt.bitvector.BitVector |
getComplement(cern.colt.bitvector.BitVector a)
Gets the complement of a bit vector. |
static cern.colt.bitvector.BitVector |
getNoisyVector(cern.colt.bitvector.BitVector original,
int noise)
Returns a noisy BitVector |
static cern.colt.bitvector.BitVector |
getNormalizedVector(int[] buff)
Gets a normalized vector. |
static cern.colt.bitvector.BitVector |
getRandomVector(int s)
Returns a random BitVector of specified size |
static int[] |
getVectorSum(int[] accum,
cern.colt.bitvector.BitVector v)
Adds a BitVector to an accumulation array. |
static int[] |
getVectorSum(int[] accum,
int[] vector)
Sums specified vectors. |
static int |
hamming(cern.colt.bitvector.BitVector vector1,
cern.colt.bitvector.BitVector vector2)
Calculates the Hamming distances between two BitVector addresses. |
static cern.colt.bitvector.BitVector |
multiplyVectors(cern.colt.bitvector.BitVector a,
cern.colt.bitvector.BitVector b)
Multiply 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)
BitVector of specified size
s - the size of the new vector
public static int hamming(cern.colt.bitvector.BitVector vector1,
cern.colt.bitvector.BitVector vector2)
BitVector addresses.
vector1 - the first BitVectorvector2 - the second BitVector
public static cern.colt.bitvector.BitVector getNoisyVector(cern.colt.bitvector.BitVector original,
int noise)
BitVector
original - original BitVectornoise - number of noisy bits to introduce
public static int[] getVectorSum(int[] accum,
cern.colt.bitvector.BitVector v)
BitVector to an accumulation array. The bits of the BitVector are first converted to either 0 to -1.
The BitVector is not modified.
accum - the accumulation array.v - the vector to be added
public static int[] getVectorSum(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 getNormalizedVector(int[] buff)
buff - a int[] vector
BitVector
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 getComplement(cern.colt.bitvector.BitVector a)
a - the input bit vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||