Class AbstractMatrix

java.lang.Object
cern.colt.PersistentObject
cern.colt.matrix.impl.AbstractMatrix
All Implemented Interfaces:
Serializable, Cloneable
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.

Version:
1.0, 09/24/99
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     

    Fields inherited from class cern.colt.PersistentObject

    serialVersionUID
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Makes this class non instantiable, but still let's others inherit from it.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    protected boolean
    Returns whether the receiver is a view or not.
    abstract int
    Returns the number of cells.
    void
    Releases any superfluous internal memory.

    Methods inherited from class cern.colt.PersistentObject

    clone

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • isNoView

      protected boolean isNoView
  • Constructor Details

    • AbstractMatrix

      protected AbstractMatrix()
      Makes this class non instantiable, but still let's others inherit from it.
  • Method Details

    • 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.
    • isView

      protected boolean isView()
      Returns whether the receiver is a view or not.
    • 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.