Package org.ojalgo.matrix.store
Class ColumnsSupplier.SingleView<N extends java.lang.Comparable<N>>
- java.lang.Object
-
- org.ojalgo.structure.Access2D.ColumnView<N>
-
- org.ojalgo.matrix.store.ColumnsSupplier.SingleView<N>
-
- All Implemented Interfaces:
java.lang.Comparable<Access2D.ColumnView<N>>
,java.lang.Iterable<Access2D.ColumnView<N>>
,java.util.Iterator<Access2D.ColumnView<N>>
,java.util.Spliterator<Access2D.ColumnView<N>>
,Access1D<N>
,Access1D.Collectable<N,Mutate1D>
,Access2D.Collectable<N,PhysicalStore<N>>
,Structure1D
,Structure2D
- Enclosing class:
- ColumnsSupplier<N extends java.lang.Comparable<N>>
public static final class ColumnsSupplier.SingleView<N extends java.lang.Comparable<N>> extends Access2D.ColumnView<N> implements Access2D.Collectable<N,PhysicalStore<N>>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends java.lang.Comparable<N>>, Access1D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate1D>, Access1D.ElementView<N extends java.lang.Comparable<N>>, Access1D.SelectionView<N extends java.lang.Comparable<N>>, Access1D.Sliceable<N extends java.lang.Comparable<N>>, Access1D.Visitable<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface java.util.Spliterator
java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,T_CONS extends java.lang.Object,T_SPLITR extends java.util.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
Fields Modifier and Type Field Description private ColumnsSupplier<N>
myBase
-
Constructor Summary
Constructors Constructor Description SingleView(ColumnsSupplier<N> base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
countColumns()
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.long
countRows()
Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.ElementView1D<N,?>
elements()
Returns an Iterable of ElementView1D.int
getColDim()
private SparseArray<N>
getCurrent()
int
getRowDim()
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.ColumnView
characteristics, column, compareTo, count, doubleValue, estimateSize, forEachRemaining, get, goToColumn, hasNext, hasPrevious, iterator, next, previous, remove, 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.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 Detail
-
myBase
private final ColumnsSupplier<N extends java.lang.Comparable<N>> myBase
-
-
Constructor Detail
-
SingleView
SingleView(ColumnsSupplier<N> base)
-
-
Method Detail
-
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
public ElementView1D<N,?> 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).
-
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
public ElementView1D<N,?> 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.
-
supplyTo
public void supplyTo(PhysicalStore<N> receiver)
- Specified by:
supplyTo
in interfaceAccess2D.Collectable<N extends java.lang.Comparable<N>,PhysicalStore<N extends java.lang.Comparable<N>>>
-
getCurrent
private SparseArray<N> getCurrent()
-
-