|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jv.vecmath.P_Vector
Abstract base class for linear algebra vectors allowing to tag individual vectors.
| Field Summary | |
protected static int |
BITS
Number of bits in each long. |
protected long[] |
m_bits
We do not create a Java BitSet but do all bit manipulations ourselfs to save storage. |
protected int[] |
m_constraint
Optional array with indices of constraints. |
protected java.lang.String |
m_name
Optional name of vector. |
protected static int |
MASK
Mask is used to distribute bits over different integers in array m_bits. |
protected static int |
NUM_BITS
Maximal number of bits allocated in m_bits. |
| Constructor Summary | |
P_Vector()
|
|
| Method Summary | |
void |
clearTag(int aBit)
Clears a single bit. |
static P_Vector[] |
clone(P_Vector[] src)
Duplicate array and all entries by recursively cloning all instance variables except inspector panels and lists of registered listeners. |
static P_Vector[][] |
clone(P_Vector[][] src)
Duplicate array and all entries by recursively cloning all instance variables except inspector panels and lists of registered listeners. |
void |
copy(P_Vector vec)
Copies the bitfield of another vector. |
long[] |
getBits()
Get integer array with bits. |
java.lang.String |
getName()
Get name of vector. |
boolean |
hasTag(int aBit)
Gets the value of a single bit. |
void |
setName(java.lang.String name)
Set name of vector, e.g. to be shown in display. |
void |
setTag(int aBit)
Sets a single bit. |
java.lang.String |
toString()
Create a multi-line string representation with detailed information about all instance variables. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final int NUM_BITS
m_bits.protected static final int BITS
long.protected static final int MASK
protected long[] m_bits
long's needed to store all
requested bits. A long is assumed to store 64=2^BITS bits.
The value of each tag refers to a specific bit in the bit array whose index is
the value of the tag.#create(int)protected java.lang.String m_name
protected int[] m_constraint
| Constructor Detail |
public P_Vector()
| Method Detail |
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
public void setName(java.lang.String name)
name - New name of vectorpublic long[] getBits()
public void setTag(int aBit)
bit - the index of the bit to be setpublic void clearTag(int aBit)
bit - the index of the bit to be clearedpublic boolean hasTag(int aBit)
bit - the index of the bit to be gottenpublic static P_Vector[][] clone(P_Vector[][] src)
null.copy(P_Vector)public static P_Vector[] clone(P_Vector[] src)
null.copy(P_Vector)public void copy(P_Vector vec)
null. The bit array of this is created or enlarged if necessary.vec - the vector to be copied
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||