Parallel Colt 0.9.4

cern.colt.matrix
Class AbstractMatrix2D

java.lang.Object
  extended by cern.colt.PersistentObject
      extended by cern.colt.matrix.AbstractMatrix
          extended by cern.colt.matrix.AbstractMatrix2D
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
DComplexMatrix2D, DoubleMatrix2D, FComplexMatrix2D, FloatMatrix2D, IntMatrix2D, LongMatrix2D, ObjectMatrix2D

public abstract class AbstractMatrix2D
extends AbstractMatrix

Abstract base class for 2-d matrices 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

Method Summary
 void checkShape(AbstractMatrix2D B)
          Sanity check for operations requiring two matrices with the same number of columns and rows.
 void checkShape(AbstractMatrix2D B, AbstractMatrix2D C)
          Sanity check for operations requiring matrices with the same number of columns and rows.
 int columns()
          Returns the number of columns.
 int columnStride()
          Returns the column stride.
 long index(int row, int column)
          Returns the position of the given coordinate within the (virtual or non-virtual) internal 1-dimensional array.
 int rows()
          Returns the number of rows.
 int rowStride()
          Returns the row stride.
 long size()
          Returns the number of cells which is rows()*columns().
 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

checkShape

public void checkShape(AbstractMatrix2D B)
Sanity check for operations requiring two matrices with the same number of columns and rows.

Throws:
IllegalArgumentException - if columns() != B.columns() || rows() != B.rows().

checkShape

public void checkShape(AbstractMatrix2D B,
                       AbstractMatrix2D C)
Sanity check for operations requiring matrices with the same number of columns and rows.

Throws:
IllegalArgumentException - if columns() != B.columns() || rows() != B.rows() || columns() != C.columns() || rows() != C.rows() .

columns

public int columns()
Returns the number of columns.


columnStride

public int columnStride()
Returns the column stride.


index

public long index(int row,
                  int column)
Returns the position of the given coordinate within the (virtual or non-virtual) internal 1-dimensional array.

Parameters:
row - the index of the row-coordinate.
column - the index of the column-coordinate.

rows

public int rows()
Returns the number of rows.


rowStride

public int rowStride()
Returns the row stride.


size

public long size()
Returns the number of cells which is rows()*columns().

Specified by:
size in class AbstractMatrix

toStringShort

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


Parallel Colt 0.9.4

Jump to the Parallel Colt Homepage