LBJ2.infer
Class XpressMPHook.Vector2DDouble
java.lang.Object
LBJ2.infer.XpressMPHook.Vector2D
LBJ2.infer.XpressMPHook.Vector2DDouble
- Enclosing class:
- XpressMPHook
protected static class XpressMPHook.Vector2DDouble
- extends XpressMPHook.Vector2D
A two dimensional vector representation implemented here because we are
not assuming Java 5.
|
Method Summary |
void |
add(double element,
int index)
Adds the specified double to the specified vector. |
double[] |
flatten()
Returns all elements in all vectors in a single, one dimensional array
in the appropriate order. |
double |
getDouble(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.Vector2DDouble
public XpressMPHook.Vector2DDouble()
- Default constructor.
add
public void add(double element,
int index)
- Adds the specified double 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.
getDouble
public double getDouble(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 double[] flatten()
- Returns all elements in all vectors in a single, one dimensional array
in the appropriate order.