maspack.widgets
Class VoidVector

java.lang.Object
  extended by maspack.matrix.VectorBase
      extended by maspack.widgets.VoidVector
All Implemented Interfaces:
java.lang.Cloneable, Vector, Clonable

public class VoidVector
extends VectorBase

A place-holder class used to indicate the size of a vector but contain no specific data.


Constructor Summary
VoidVector(int size)
           
 
Method Summary
 VoidVector clone()
           
 double get(int idx)
          Gets a single element of this vector.
 void set(int idx, double val)
          Sets a single element of this vector.
 int size()
          Returns the number of elements in this vector.
 
Methods inherited from class maspack.matrix.VectorBase
containsNaN, copy, copyAndAdd, copyAndNegate, copyAndScale, copyAndSub, copyAndSubLeft, dot, epsilonEquals, equals, get, get, getDefaultFormat, hasNaN, infinityNorm, isColumnVectorStringsVertical, isFixedSize, isRowVector, maxElement, minElement, norm, normSquared, oneNorm, scan, set, set, set, setColumnVectorStringsVertical, setDefaultFormat, setRowVector, setSize, toString, toString, toString, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VoidVector

public VoidVector(int size)
Method Detail

size

public int size()
Description copied from class: VectorBase
Returns the number of elements in this vector.

Specified by:
size in interface Vector
Specified by:
size in class VectorBase
Returns:
number of elements

set

public void set(int idx,
                double val)
Description copied from class: VectorBase
Sets a single element of this vector.

Specified by:
set in interface Vector
Specified by:
set in class VectorBase
Parameters:
idx - element index
val - element value

get

public double get(int idx)
Description copied from class: VectorBase
Gets a single element of this vector.

Specified by:
get in interface Vector
Specified by:
get in class VectorBase
Parameters:
idx - element index
Returns:
element value

clone

public VoidVector clone()
Specified by:
clone in interface Clonable
Overrides:
clone in class VectorBase