Package cern.colt.matrix.impl
Class DelegateDoubleMatrix1D
java.lang.Object
cern.colt.PersistentObject
cern.colt.matrix.impl.AbstractMatrix
cern.colt.matrix.impl.AbstractMatrix1D
cern.colt.matrix.DoubleMatrix1D
cern.colt.matrix.impl.WrapperDoubleMatrix1D
cern.colt.matrix.impl.DelegateDoubleMatrix1D
- All Implemented Interfaces:
Serializable
,Cloneable
1-d matrix holding double elements; either a view wrapping another 2-d matrix and therefore delegating calls to it.
- Version:
- 1.0, 09/24/99
-
Field Summary
FieldsFields inherited from class cern.colt.matrix.impl.AbstractMatrix1D
size, stride, zero
Fields inherited from class cern.colt.matrix.impl.AbstractMatrix
isNoView
Fields inherited from class cern.colt.PersistentObject
serialVersionUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getQuick
(int index) Returns the matrix cell value at coordinate index.like
(int size) Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified size.like2D
(int rows, int columns) Construct and returns a new 2-d matrix of the corresponding dynamic type, entirelly independent of the receiver.void
setQuick
(int index, double value) Sets the matrix cell at coordinate index to the specified value.Methods inherited from class cern.colt.matrix.impl.WrapperDoubleMatrix1D
getContent, viewFlip, viewPart, viewSelection, viewSelectionLike, viewStrides
Methods inherited from class cern.colt.matrix.DoubleMatrix1D
aggregate, aggregate, assign, assign, assign, assign, assign, assign, cardinality, cardinality, copy, equals, equals, get, getNonZeros, getNonZeros, haveSharedCells, haveSharedCellsRaw, like, set, swap, toArray, toArray, toString, view, viewSelection, viewSorted, zDotProduct, zDotProduct, zDotProduct, zDotProduct, zSum
Methods inherited from class cern.colt.matrix.impl.AbstractMatrix1D
_offset, _rank, checkIndex, checkIndexes, checkRange, checkSize, checkSize, index, setUp, setUp, size, stride, toStringShort, vFlip, vPart, vStrides
Methods inherited from class cern.colt.matrix.impl.AbstractMatrix
ensureCapacity, isView, trimToSize
Methods inherited from class cern.colt.PersistentObject
clone
-
Field Details
-
-
row
protected int row
-
-
Constructor Details
-
DelegateDoubleMatrix1D
-
-
Method Details
-
getQuick
public double getQuick(int index) Returns the matrix cell value at coordinate index.Provided with invalid parameters this method may return invalid objects without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): index<0 || index>=size().
- Overrides:
getQuick
in classWrapperDoubleMatrix1D
- Parameters:
index
- the index of the cell.- Returns:
- the value of the specified cell.
-
like
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified size. For example, if the receiver is an instance of type DenseDoubleMatrix1D the new matrix must also be of type DenseDoubleMatrix1D, if the receiver is an instance of type SparseDoubleMatrix1D the new matrix must also be of type SparseDoubleMatrix1D, etc. In general, the new matrix should have internal parametrization as similar as possible.- Overrides:
like
in classWrapperDoubleMatrix1D
- Parameters:
size
- the number of cell the matrix shall have.- Returns:
- a new empty matrix of the same dynamic type.
-
like2D
Construct and returns a new 2-d matrix of the corresponding dynamic type, entirelly independent of the receiver. For example, if the receiver is an instance of type DenseDoubleMatrix1D the new matrix must be of type DenseDoubleMatrix2D, if the receiver is an instance of type SparseDoubleMatrix1D the new matrix must be of type SparseDoubleMatrix2D, etc.- Overrides:
like2D
in classWrapperDoubleMatrix1D
- Parameters:
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.- Returns:
- a new matrix of the corresponding dynamic type.
-
setQuick
public void setQuick(int index, double value) Sets the matrix cell at coordinate index to the specified value.Provided with invalid parameters this method may access illegal indexes without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): index<0 || index>=size().
- Overrides:
setQuick
in classWrapperDoubleMatrix1D
- Parameters:
index
- the index of the cell.value
- the value to be filled into the specified cell.
-