cern.colt.matrix.impl
Class AbstractMatrix
java.lang.Object
|
+--cern.colt.PersistentObject
|
+--cern.colt.matrix.impl.AbstractMatrix
- All Implemented Interfaces:
- Cloneable, Serializable
- Direct Known Subclasses:
- AbstractMatrix1D, AbstractMatrix2D, AbstractMatrix3D
- public abstract class AbstractMatrix
- extends PersistentObject
Abstract base class for arbitrary-dimensional matrices holding objects or primitive data types such as int
, float
, etc.
First see the package summary and javadoc tree view to get the broad picture.
Note that this implementation is not synchronized.
- See Also:
- Serialized Form
Method Summary |
void |
ensureCapacity(int minNonZeros)
Ensures that the receiver can hold at least the specified number of non-zero (non-null) cells without needing to allocate new internal memory. |
abstract int |
size()
Returns the number of cells. |
void |
trimToSize()
Releases any superfluous internal memory. |
ensureCapacity
public void ensureCapacity(int minNonZeros)
- Ensures that the receiver can hold at least the specified number of non-zero (non-null) cells without needing to allocate new internal memory.
If necessary, allocates new internal memory and increases the capacity of the receiver.
This default implementation does nothing. Override this method if necessary.
- Parameters:
minNonZeros
- the desired minimum number of non-zero (non-null) cells.
size
public abstract int size()
- Returns the number of cells.
trimToSize
public void trimToSize()
- Releases any superfluous internal memory. An application can use this operation to minimize the
storage of the receiver.
This default implementation does nothing. Override this method if necessary.
Submit a bug or feature. Check the Colt home page for the latest news.