@Generated("org.ejml.data.DMatrixIterator") public class FMatrixIterator extends Object implements Iterator<Float>
This is a matrix iterator for traversing through a submatrix. For speed it is recommended that you directly access the elements in the matrix, but there are some situations where this can be a better design.
Constructors Constructor Description
FMatrixD1 a, boolean rowMajor, int minRow, int minCol, int maxRow, int maxCol)(Creates a new iterator for traversing through a submatrix inside this matrix.
Modifier and Type Method Description
()Which element in the submatrix was returned by next()
()True if it is iterating through the matrix by rows and false if by columns.
(float value)Sets the value of the current element.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
FMatrixIteratorpublic FMatrixIterator(FMatrixD1 a, boolean rowMajor, int minRow, int minCol, int maxRow, int maxCol)Creates a new iterator for traversing through a submatrix inside this matrix. It can be traversed by row or by column. Range of elements is inclusive, e.g. minRow = 0 and maxRow = 1 will include rows 0 and 1. The iteration starts at (minRow,minCol) and ends at (maxRow,maxCol)
a- the matrix it is iterating through
rowMajor- true means it will traverse through the submatrix by row first, false by columns.
minRow- first row it will start at.
minCol- first column it will start at.
maxRow- last row it will stop at.
maxCol- last column it will stop at.
hasNextpublic boolean hasNext()
nextpublic Float next()
removepublic void remove()
getIndexpublic int getIndex()Which element in the submatrix was returned by next()
- Submatrix element's index.
isRowMajorpublic boolean isRowMajor()True if it is iterating through the matrix by rows and false if by columns.
- row major or column major
setpublic void set(float value)Sets the value of the current element.
value- The element's new value.