|
Parallel Colt 0.7.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cern.colt.PersistentObject cern.colt.matrix.AbstractMatrix cern.colt.matrix.AbstractMatrix1D cern.colt.matrix.tfloat.FloatMatrix1D cern.colt.matrix.tfloat.impl.WrapperFloatMatrix1D
public class WrapperFloatMatrix1D
1-d matrix holding float elements; either a view wrapping another matrix or a matrix whose views are wrappers.
Field Summary |
---|
Fields inherited from class cern.colt.PersistentObject |
---|
serialVersionUID |
Constructor Summary | |
---|---|
WrapperFloatMatrix1D(FloatMatrix1D newContent)
|
Method Summary | |
---|---|
Object |
elements()
Returns the elements of this matrix. |
float |
getQuick(int index)
Returns the matrix cell value at coordinate index. |
FloatMatrix1D |
like(int size)
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified size. |
FloatMatrix2D |
like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic type, entirelly independent of the receiver. |
FloatMatrix2D |
reshape(int rows,
int cols)
Returns new FloatMatrix2D of size rows x columns whose elements are taken column-wise from this matrix. |
FloatMatrix3D |
reshape(int slices,
int rows,
int cols)
Returns new FloatMatrix3D of size slices x rows x columns, whose elements are taken column-wise from this matrix. |
void |
setQuick(int index,
float value)
Sets the matrix cell at coordinate index to the specified value. |
FloatMatrix1D |
viewFlip()
Constructs and returns a new flip view. |
FloatMatrix1D |
viewPart(int index,
int width)
Constructs and returns a new sub-range view that is a width sub matrix starting at index. |
FloatMatrix1D |
viewSelection(int[] indexes)
Constructs and returns a new selection view that is a matrix holding the indicated cells. |
FloatMatrix1D |
viewStrides(int _stride)
Constructs and returns a new stride view which is a sub matrix consisting of every i-th cell. |
Methods inherited from class cern.colt.matrix.tfloat.FloatMatrix1D |
---|
aggregate, aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, cardinality, copy, equals, equals, get, getMaxLocation, getMinLocation, getNegativeValues, getNonZeros, getNonZeros, getPositiveValues, like, normalize, set, setSize, swap, toArray, toArray, toString, viewSelection, viewSorted, zDotProduct, zDotProduct, zDotProduct, zSum |
Methods inherited from class cern.colt.matrix.AbstractMatrix1D |
---|
checkSize, index, size, stride, toStringShort |
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 |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WrapperFloatMatrix1D(FloatMatrix1D newContent)
Method Detail |
---|
public float getQuick(int 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().
getQuick
in class FloatMatrix1D
index
- the index of the cell.
public Object elements()
FloatMatrix1D
elements
in class FloatMatrix1D
public FloatMatrix1D like(int size)
like
in class FloatMatrix1D
size
- the number of cell the matrix shall have.
public FloatMatrix2D like2D(int rows, int columns)
like2D
in class FloatMatrix1D
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.
public FloatMatrix2D reshape(int rows, int cols)
FloatMatrix1D
reshape
in class FloatMatrix1D
rows
- number of rowscols
- number of columns
public FloatMatrix3D reshape(int slices, int rows, int cols)
FloatMatrix1D
reshape
in class FloatMatrix1D
rows
- number of rowscols
- number of columns
public void setQuick(int index, float 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().
setQuick
in class FloatMatrix1D
index
- the index of the cell.value
- the value to be filled into the specified cell.public FloatMatrix1D viewFlip()
viewFlip
in class FloatMatrix1D
public FloatMatrix1D viewPart(int index, int width)
Note that the view is really just a range restriction: The returned matrix is backed by this matrix, so changes in the returned matrix are reflected in this matrix, and vice-versa.
The view contains the cells from index..index+width-1. and has view.size() == width. A view's legal coordinates are again zero based, as usual. In other words, legal coordinates of the view are 0 .. view.size()-1==width-1. As usual, any attempt to access a cell at other coordinates will throw an IndexOutOfBoundsException.
viewPart
in class FloatMatrix1D
index
- The index of the first cell.width
- The width of the range.
IndexOutOfBoundsException
- if index<0 || width<0 || index+width>size().public FloatMatrix1D viewSelection(int[] indexes)
Example:
this = (0,0,8,0,7) indexes = (0,2,4,2) --> view = (0,8,7,8)Note that modifying indexes after this call has returned has no effect on the view. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.
viewSelection
in class FloatMatrix1D
indexes
- The indexes of the cells that shall be visible in the new
view. To indicate that all cells shall be visible,
simply set this parameter to null.
IndexOutOfBoundsException
- if !(0 <= indexes[i] < size()) for any
i=0..indexes.length()-1.public FloatMatrix1D viewStrides(int _stride)
viewStrides
in class FloatMatrix1D
_stride
- the step factor.
IndexOutOfBoundsException
- if stride <= 0.
|
Parallel Colt 0.7.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |