|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.infer.XpressMPHook.Vector2D
protected static class XpressMPHook.Vector2D
A two dimensional vector representation implemented here because we are
not assuming Java 5. The term sub-vector appearing below refers to the
Vector objects which are elements of data.
| Field Summary | |
|---|---|
protected java.util.Vector |
data
The vector of vectors. |
protected int |
size
The total number of elements in all vectors. |
| Constructor Summary | |
|---|---|
XpressMPHook.Vector2D()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object element,
int index)
Adds the specified element to the specified vector. |
java.lang.Object |
get(int v,
int i)
Returns the element at the specified position in the 2D vector. |
int[] |
indexMap()
The array returned by this method contains indexes into the arrays returned by XpressMPHook.Vector2DInt.flatten() and
XpressMPHook.Vector2DDouble.flatten() indicating where each
vector began and ended before they were flattened. |
int |
size()
Returns the total number of elements in all vectors. |
int |
size(int v)
Returns the size of the specified sub-vector. |
int |
subVectors()
Returns the number of vectors contained in data. |
java.lang.String |
toString()
Returns a string representation of this two dimensional vector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector data
protected int size
| Constructor Detail |
|---|
public XpressMPHook.Vector2D()
| Method Detail |
|---|
public int subVectors()
data.
public int size()
public int size(int v)
v - The index of a sub-vector.
v.
public void add(java.lang.Object element,
int index)
element - The element to add.index - The index of the vector to which element
should be added.
public java.lang.Object get(int v,
int i)
v - The index of the sub-vector in which to look.i - The index of the element in vector v.
public int[] indexMap()
XpressMPHook.Vector2DInt.flatten() and
XpressMPHook.Vector2DDouble.flatten() indicating where each
vector began and ended before they were flattened.
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||