-
- All Superinterfaces:
Structure1D
- All Known Subinterfaces:
Access2D<N>,AccessAnyD<N>,DecompositionStore<N>,Householder<N>,HouseholderReference<N>,Matrix2D<N,M>,MatrixStore<N>,Mutate1D.ModifiableReceiver<N>,Mutate2D.ModifiableReceiver<N>,MutateAnyD.ModifiableReceiver<N>,PhysicalStore<N>,PolynomialFunction<N>,TransformableRegion<N>
- All Known Implementing Classes:
AboveBelowStore,AbstractPolynomial,AbstractStore,Access1D.SelectionView,Access2D.ColumnView,Access2D.RowView,Access2D.SelectionView,AccessAnyD.MatrixView,AccessAnyD.SelectionView,AccessAnyD.VectorView,AccessSeries,AnyTensor,Array1D,Array2D,ArrayAnyD,ArrayC128,ArrayH256,ArrayQ128,ArrayR032,ArrayR064,ArrayR128,ArrayR256,ArrayZ008,ArrayZ016,ArrayZ032,ArrayZ064,BasicArray,BasicMatrix,BinaryFunctionSeries,BufferArray,BufferR032,BufferR064,BufferZ008,BufferZ016,BufferZ032,BufferZ064,ColumnsStore,ColumnsSupplier,ColumnsSupplier.SingleView,ComplexNumber,ComposingStore,CompressedSparseR064,ConjugatedStore,DataBatch,DataSeries,DenseArray,DenseMutator2D,DenseTableau,DiagonalStore,DifferencesSeries,EntrySet.KeyedPrimitives,EntrySet.ObjectByte,EntrySet.ObjectDouble,EntrySet.ObjectFloat,EntrySet.ObjectInt,EntrySet.ObjectLong,EntrySet.ObjectShort,Equation,ExplicitTimeSeries,FactoryStore,GenericStore,Householder.Generic,Householder.Primitive32,Householder.Primitive64,HouseholderColumn,HouseholderRow,IdentityStore,ImageData,ImageData.SingleChannel,ImplicitTimeSeries,IndexedMap.MappedPrimitives,LeftRightStore,LimitStore,LogicalStore,LongToNumberMap,LowerHessenbergStore,LowerSymmetricStore,LowerTriangularStore,MatrixC128,MatrixC128.DenseReceiver,MatrixH256,MatrixH256.DenseReceiver,MatrixQ128,MatrixQ128.DenseReceiver,MatrixR032,MatrixR032.DenseReceiver,MatrixR064,MatrixR064.DenseReceiver,MatrixR128,MatrixR128.DenseReceiver,MatrixTensor,NumberList,OffHeapArray,OffHeapR032,OffHeapR064,OffHeapZ008,OffHeapZ016,OffHeapZ032,OffHeapZ064,OffsetStore,Optimisation.Result,PlainArray,PolynomialC128,PolynomialQ128,PolynomialR032,PolynomialR064,PolynomialR128,PolynomialR256,Primitive1D,Primitive1D.Simple,Primitive1D.Wrapper,Primitive2D,Primitive2D.Simple,Primitive2D.Wrapper,PrimitiveAnyD,PrimitiveAnyD.Simple,PrimitiveAnyD.Wrapper,PrimitiveArray,PrimitiveSeries,PrimitiveTimeSeries,PrunedSeries,Quaternion,QuotientsSeries,R032Store,R064CSC,R064CSR,R064Store,RawStore,ReferenceTypeArray,RepeatedColumnsStore,RepeatedRowsStore,RowsStore,RowsSupplier,RowsSupplier.SingleView,SampleSet,ScalarArray,ScalarPolynomial,SegmentedArray,SelectingStore,ShadingStore,SimplexTableau,SingleStore,SparseArray,SparseStore,SparseTableau,Subregion2D,Subregion2D.ColumnsRegion,Subregion2D.LimitRegion,Subregion2D.OffsetRegion,Subregion2D.RowsRegion,Subregion2D.SynchronizedRegion,Subregion2D.TransposedRegion,Subregion2D.WrapperRegion,SuperimposedStore,TransjugatedStore,TransposedStore,UnaryFunctionSeries,UnaryOperatoStore,UpperHessenbergStore,UpperSymmetricStore,UpperTriangularStore,VectorTensor,WrapperStore,ZeroStore
public interface Access1D<N extends java.lang.Comparable<N>> extends Structure1D
1-dimensional accessor (get) methods. The nested interfaces declare additional methods that implicitly require that the elements have been accessed, but they do not extends the main/outer interface. A 1D-structure can be vistiable, aggregatable and/or expose various element properties without allowing explicit access to its elements.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAccess1D.Aggregatable<N extends java.lang.Comparable<N>>This interface complements Access1D.Visitable but does not extend it.static interfaceAccess1D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate1D>static classAccess1D.ElementView<N extends java.lang.Comparable<N>>static classAccess1D.SelectionView<N extends java.lang.Comparable<N>>static interfaceAccess1D.Sliceable<N extends java.lang.Comparable<N>>static interfaceAccess1D.Visitable<N extends java.lang.Comparable<N>>-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default <NN extends java.lang.Comparable<NN>,R extends Mutate1D.Receiver<NN>>
Access1D.Collectable<NN,R>asCollectable1D()default <K> Keyed1D<K,N>asKeyed1D(Structure1D.IndexMapper<K> indexMapper)default java.util.List<N>asList()An (immutable)Listdelegating to thisAccess1D.static Access1D<java.lang.Double>asPrimitive1D(Access1D<?> access)Deprecated.v54 UsePrimitive1D.wrap(Structure1D)insteaddefault voidaxpy(double a, Mutate1D.Modifiable<?> y)Will calculate y = y + a x, will add "a" times "this" to "y"default bytebyteValue(int index)default bytebyteValue(long index)default doubledot(Access1D<?> vector)Will calculate and return the dot product of this 1D-structure and another input 1D-vector.doubledoubleValue(int index)default doubledoubleValue(long index)default ElementView1D<N,?>elements()Returns an Iterable of ElementView1D.static booleanequals(Access1D<?> accessA, Access1D<?> accessB, NumberContext accuracy)Tests if the two data structures are numerically equal to the given accuracy.default floatfloatValue(int index)default floatfloatValue(long index)Nget(long index)default intintValue(int index)default intintValue(long index)default longlongValue(int index)default longlongValue(long index)default ElementView1D<N,?>nonzeros()Similar toelements()but avoids elements that are structurally known to be zero.default Access1D<N>select(long... selection)Creates a view of the underlying data structure of only the selected elements.default shortshortValue(int index)default shortshortValue(long index)default voidsupplyTo(double[] receiver)default java.util.List<N>toList()Copy the elements to a new (mutable)List.default double[]toRawCopy1D()static java.lang.StringtoString(Access1D<?> access)static Access1D<java.lang.Double>wrap(double... target)Deprecated.v54 UsePrimitive1D.of(double...)orArrayR064.wrap(double...)insteadstatic <N extends java.lang.Comparable<N>>
Access1D<N>wrap(java.util.List<? extends N> target)static <N extends java.lang.Comparable<N>>
Access1D<N>wrap(N[] target)-
Methods inherited from interface org.ojalgo.structure.Structure1D
count, size
-
-
-
-
Method Detail
-
asPrimitive1D
@Deprecated static Access1D<java.lang.Double> asPrimitive1D(Access1D<?> access)
Deprecated.v54 UsePrimitive1D.wrap(Structure1D)instead
-
equals
static boolean equals(Access1D<?> accessA, Access1D<?> accessB, NumberContext accuracy)
Tests if the two data structures are numerically equal to the given accuracy. (Only works with real numbers, and can't handle more than "double precision".) You have to implement your own version to handle other cases.
-
toString
static java.lang.String toString(Access1D<?> access)
-
wrap
@Deprecated static Access1D<java.lang.Double> wrap(double... target)
Deprecated.v54 UsePrimitive1D.of(double...)orArrayR064.wrap(double...)instead
-
wrap
static <N extends java.lang.Comparable<N>> Access1D<N> wrap(java.util.List<? extends N> target)
-
wrap
static <N extends java.lang.Comparable<N>> Access1D<N> wrap(N[] target)
-
asCollectable1D
default <NN extends java.lang.Comparable<NN>,R extends Mutate1D.Receiver<NN>> Access1D.Collectable<NN,R> asCollectable1D()
-
asKeyed1D
default <K> Keyed1D<K,N> asKeyed1D(Structure1D.IndexMapper<K> indexMapper)
-
asList
default java.util.List<N> asList()
An (immutable)Listdelegating to thisAccess1D.- See Also:
toList()
-
axpy
default void axpy(double a, Mutate1D.Modifiable<?> y)Will calculate y = y + a x, will add "a" times "this" to "y"- Parameters:
a- The scaley- The "vector" to update
-
byteValue
default byte byteValue(int index)
-
byteValue
default byte byteValue(long index)
-
dot
default double dot(Access1D<?> vector)
Will calculate and return the dot product of this 1D-structure and another input 1D-vector.- Parameters:
vector- Another 1D-structure- Returns:
- The dot product
-
doubleValue
double doubleValue(int index)
-
doubleValue
default double doubleValue(long index)
-
elements
default ElementView1D<N,?> elements()
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).
-
floatValue
default float floatValue(int index)
-
floatValue
default float floatValue(long index)
-
get
N get(long index)
-
intValue
default int intValue(int index)
-
intValue
default int intValue(long index)
-
longValue
default long longValue(int index)
-
longValue
default long longValue(long index)
-
nonzeros
default ElementView1D<N,?> nonzeros()
Similar toelements()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 thenonzeros()andelements()methods do the same thing! Only some specific implementations are able to actually exploit structure/sparsity to view fewer elements.
-
select
default Access1D<N> select(long... selection)
Creates a view of the underlying data structure of only the selected elements.
-
shortValue
default short shortValue(int index)
-
shortValue
default short shortValue(long index)
-
supplyTo
default void supplyTo(double[] receiver)
-
toList
default java.util.List<N> toList()
Copy the elements to a new (mutable)List.- See Also:
asList()
-
toRawCopy1D
default double[] toRawCopy1D()
-
-