Package org.ojalgo.matrix.store
Class RowsSupplier.SingleView<N extends Comparable<N>>
java.lang.Object
org.ojalgo.structure.Access2D.RowView<N>
org.ojalgo.matrix.store.RowsSupplier.SingleView<N>
- All Implemented Interfaces:
Comparable<Access2D.RowView<N>>
,Iterable<Access2D.RowView<N>>
,Iterator<Access2D.RowView<N>>
,Spliterator<Access2D.RowView<N>>
,Access1D<N>
,Access1D.Collectable<N,
,Mutate1D> Access2D.Collectable<N,
,PhysicalStore<N>> Structure1D
,Structure2D
- Enclosing class:
RowsSupplier<N extends Comparable<N>>
public static final class RowsSupplier.SingleView<N extends Comparable<N>>
extends Access2D.RowView<N>
implements Access2D.Collectable<N,PhysicalStore<N>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends Comparable<N>>, Access1D.Collectable<N extends Comparable<N>,
R extends Mutate1D>, Access1D.ElementView<N extends Comparable<N>>, Access1D.SelectionView<N extends Comparable<N>>, Access1D.Sliceable<N extends Comparable<N>>, Access1D.Visitable<N extends Comparable<N>> Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,
T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,
B extends Structure1D.Logical<S, B>>, Structure1D.LongIndex, Structure1D.LoopCallback Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,
B extends Structure2D.Logical<S, B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R, C>, Structure2D.RowColumnMapper<R, C> -
Field Summary
FieldsFields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.long
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.ElementView1D
<N, ?> elements()
Returns an Iterable of ElementView1D.int
private SparseArray
<N> int
ElementView1D
<N, ?> nonzeros()
Similar toAccess1D.elements()
but avoids elements that are structurally known to be zero.void
supplyTo
(PhysicalStore<N> receiver) Methods inherited from class org.ojalgo.structure.Access2D.RowView
characteristics, compareTo, count, doubleValue, estimateSize, forEachRemaining, get, goToRow, hasNext, hasPrevious, iterator, next, previous, remove, row, size, stream, supplyTo, toString, tryAdvance, trySplit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, axpy, byteValue, byteValue, dot, doubleValue, floatValue, floatValue, intValue, intValue, longValue, longValue, select, shortValue, shortValue, supplyTo, toRawCopy1D
Methods inherited from interface org.ojalgo.structure.Access1D.Collectable
collect
Methods inherited from interface org.ojalgo.structure.Access2D.Collectable
collect
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
Methods inherited from interface org.ojalgo.structure.Structure2D
count, firstInColumn, firstInRow, getMaxDim, getMinDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
Field Details
-
myBase
-
-
Constructor Details
-
SingleView
SingleView(RowsSupplier<N> base)
-
-
Method Details
-
countColumns
public long countColumns()Description copied from interface:Structure2D
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countColumns
in interfaceStructure2D
- Returns:
- The number of columns
-
countRows
public long countRows()Description copied from interface:Structure2D
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.- Specified by:
countRows
in interfaceStructure2D
- Returns:
- The number of rows
-
elements
Description copied from interface:Access1D
Returns an Iterable of ElementView1D. It allows to iterate over the instance's element "positions" without actually extracting the elements (unless you explicitly do so).- Specified by:
elements
in interfaceAccess1D<N extends Comparable<N>>
-
getColDim
public int getColDim()- Specified by:
getColDim
in interfaceStructure2D
- Returns:
- The number of columns
-
getRowDim
public int getRowDim()- Specified by:
getRowDim
in interfaceStructure2D
- Returns:
- The number of rows
-
nonzeros
Description copied from interface:Access1D
Similar toAccess1D.elements()
but avoids elements that are structurally known to be zero. (That does not eliminate all zero-values from this view.) With an arbitrary (dense) unstructured implementation theAccess1D.nonzeros()
andAccess1D.elements()
methods do the same thing! Only some specific implementations are able to actually exploit structure/sparsity to view fewer elements.- Specified by:
nonzeros
in interfaceAccess1D<N extends Comparable<N>>
-
supplyTo
- Specified by:
supplyTo
in interfaceAccess2D.Collectable<N extends Comparable<N>,
PhysicalStore<N extends Comparable<N>>>
-
getCurrent
-