LBJ2.infer
Class XpressMPHook.Vector2DInt
java.lang.Object
LBJ2.infer.XpressMPHook.Vector2D
LBJ2.infer.XpressMPHook.Vector2DInt
- Enclosing class:
- XpressMPHook
protected static class XpressMPHook.Vector2DInt
- extends XpressMPHook.Vector2D
A two dimensional vector representation implemented here because we are
not assuming Java 5.
|
Method Summary |
void |
add(int element,
int index)
Adds the specified integer to the specified vector. |
int[] |
flatten()
Returns all elements in all vectors in a single, one dimensional array
in the appropriate order. |
int |
getInt(int v,
int i)
Returns the element at the specified position in the 2D vector. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
XpressMPHook.Vector2DInt
public XpressMPHook.Vector2DInt()
- Default constructor.
add
public void add(int element,
int index)
- Adds the specified integer to the specified vector. If the specified
vector does not exist, new vectors are added until it does.
- Parameters:
element - The element to add.index - The index of the vector to which element
should be added.
getInt
public int getInt(int v,
int i)
- Returns the element at the specified position in the 2D vector.
- Parameters:
v - The index of the sub-vector in which to look.i - The index of the element in vector v.
- Returns:
- The element at the specified position.
flatten
public int[] flatten()
- Returns all elements in all vectors in a single, one dimensional array
in the appropriate order.