Parallel Colt 0.7.2

cern.colt.matrix
Class AbstractMatrix1D

java.lang.Object
  extended by cern.colt.PersistentObject
      extended by cern.colt.matrix.AbstractMatrix
          extended by cern.colt.matrix.AbstractMatrix1D
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
DComplexMatrix1D, DoubleMatrix1D, FComplexMatrix1D, FloatMatrix1D, IntMatrix1D, ObjectMatrix1D

public abstract class AbstractMatrix1D
extends AbstractMatrix

Abstract base class for 1-d matrices (aka vectors) holding objects or primitive data types such as int, double, etc. First see the package summary and javadoc tree view to get the broad picture.

Note that this implementation is not synchronized.

Version:
1.0, 09/24/99
Author:
wolfgang.hoschek@cern.ch
See Also:
Serialized Form

Field Summary
 
Fields inherited from class cern.colt.PersistentObject
serialVersionUID
 
Method Summary
 void checkSize(AbstractMatrix1D B)
          Sanity check for operations requiring two matrices with the same size.
 long index(int rank)
          Returns the position of the element with the given relative rank within the (virtual or non-virtual) internal 1-dimensional array.
 int size()
          Returns the number of cells.
 int stride()
          Returns the stride.
 String toStringShort()
          Returns a string representation of the receiver's shape.
 
Methods inherited from class cern.colt.matrix.AbstractMatrix
ensureCapacity, isView, trimToSize
 
Methods inherited from class cern.colt.PersistentObject
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkSize

public void checkSize(AbstractMatrix1D B)
Sanity check for operations requiring two matrices with the same size.

Throws:
IllegalArgumentException - if size() != B.size().

index

public long index(int rank)
Returns the position of the element with the given relative rank within the (virtual or non-virtual) internal 1-dimensional array. You may want to override this method for performance.

Parameters:
rank - the rank of the element.

size

public int size()
Returns the number of cells.

Specified by:
size in class AbstractMatrix

stride

public int stride()
Returns the stride.


toStringShort

public String toStringShort()
Returns a string representation of the receiver's shape.


Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage