- java.lang.Object
-
- org.ojalgo.array.BasicArray<N>
-
- org.ojalgo.array.DenseArray<N>
-
- org.ojalgo.array.PlainArray<N>
-
- org.ojalgo.array.ReferenceTypeArray<N>
-
- org.ojalgo.array.ScalarArray<N>
-
- All Implemented Interfaces:
java.util.RandomAccess,Access1D<N>,Access1D.Aggregatable<N>,Access1D.Collectable<N,Mutate1D>,Access1D.Visitable<N>,Factory1D.Builder<DenseArray<N>>,Mutate1D,Mutate1D.Fillable<N>,Mutate1D.Modifiable<N>,Mutate1D.Sortable,Structure1D
- Direct Known Subclasses:
ArrayC128,ArrayH256,ArrayQ128,ArrayR128,GenericStore
public abstract class ScalarArray<N extends Scalar<N>> extends ReferenceTypeArray<N>
A one- and/or arbitrary-dimensional array of Scalar.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScalarArray.Factory<N extends Scalar<N>>-
Nested classes/interfaces inherited from class org.ojalgo.array.BasicArray
BasicArray.BaseFactory<N extends java.lang.Comparable<N>,A extends BasicArray<N>>
-
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 org.ojalgo.structure.Mutate1D
Mutate1D.Fillable<N extends java.lang.Comparable<N>>, Mutate1D.Mixable<N extends java.lang.Comparable<N>>, Mutate1D.Modifiable<N extends java.lang.Comparable<N>>, Mutate1D.ModifiableReceiver<N extends java.lang.Comparable<N>>, Mutate1D.Receiver<N extends java.lang.Comparable<N>>, Mutate1D.Sortable
-
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
-
-
Field Summary
-
Fields inherited from class org.ojalgo.array.ReferenceTypeArray
data
-
Fields inherited from class org.ojalgo.array.PlainArray
CHARACTERISTICS, MAX_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedScalarArray(ScalarArray.Factory<N> factory, N[] data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, double addend)protected voidadd(int index, java.lang.Comparable<?> addend)voidaxpy(double a, Mutate1D.Modifiable<?> y)Will calculate y = y + a x, will add "a" times "this" to "y"bytebyteValue(int index)doubledoubleValue(int index)protected voidfillOne(int index, Access1D<?> values, long valueIndex)floatfloatValue(int index)protected intindexOfLargest(int first, int limit, int step)intintValue(int index)protected booleanisAbsolute(int index)protected booleanisSmall(int index, double comparedTo)longlongValue(int index)voidset(int index, long value)shortshortValue(int index)voidsortAscending()voidsortDescending()-
Methods inherited from class org.ojalgo.array.ReferenceTypeArray
copyOfData, equals, exchange, fill, fill, fillMatching, fillMatching, fillMatching, fillOne, fillOne, get, hashCode, modify, modify, modify, modify, modify, modify, modifyOne, reset, searchAscending, set, set, set, spliterator, valueOf, valueOf, valueOf, visit, visitOne
-
Methods inherited from class org.ojalgo.array.PlainArray
add, add, add, add, add, add, add, add, add, add, add, add, byteValue, count, doubleValue, exchange, fill, fill, fillAll, fillAll, fillRange, fillRange, floatValue, get, indexOfLargest, intValue, longValue, modify, modify, modify, modifyOne, set, set, set, set, set, set, set, set, set, set, shortValue, size, visit, visitOne
-
Methods inherited from class org.ojalgo.array.DenseArray
build
-
Methods inherited from class org.ojalgo.array.BasicArray
aggregateRange, factory, getMathType, indexOfLargest, isPrimitive, modifyAll, modifyMatching, modifyMatching, modifyRange, supplyTo, toString, visitAll, visitRange, wrapInArray1D, wrapInArray2D, wrapInArrayAnyD
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, asList, dot, elements, nonzeros, select, supplyTo, toList, toRawCopy1D
-
Methods inherited from interface org.ojalgo.structure.Access1D.Aggregatable
aggregateAll
-
Methods inherited from interface org.ojalgo.structure.Access1D.Collectable
collect
-
Methods inherited from interface org.ojalgo.structure.Mutate1D.Fillable
fillCompatible, fillMatching
-
Methods inherited from interface org.ojalgo.structure.Structure1D
count, size
-
-
-
-
Constructor Detail
-
ScalarArray
protected ScalarArray(ScalarArray.Factory<N> factory, N[] data)
-
-
Method Detail
-
add
public final void add(int index, double addend)
-
axpy
public final void axpy(double a, Mutate1D.Modifiable<?> y)Description copied from interface:Access1DWill calculate y = y + a x, will add "a" times "this" to "y"- Parameters:
a- The scaley- The "vector" to update
-
byteValue
public byte byteValue(int index)
-
doubleValue
public final double doubleValue(int index)
- Specified by:
doubleValuein interfaceAccess1D<N extends Scalar<N>>- Overrides:
doubleValuein classPlainArray<N extends Scalar<N>>
-
floatValue
public final float floatValue(int index)
- Specified by:
floatValuein interfaceAccess1D<N extends Scalar<N>>- Specified by:
floatValuein classPlainArray<N extends Scalar<N>>
-
intValue
public int intValue(int index)
-
longValue
public long longValue(int index)
-
set
public void set(int index, long value)
-
shortValue
public short shortValue(int index)
- Specified by:
shortValuein interfaceAccess1D<N extends Scalar<N>>- Overrides:
shortValuein classPlainArray<N extends Scalar<N>>
-
sortAscending
public final void sortAscending()
- Specified by:
sortAscendingin interfaceMutate1D.Sortable- Specified by:
sortAscendingin classPlainArray<N extends Scalar<N>>
-
sortDescending
public final void sortDescending()
- Specified by:
sortDescendingin interfaceMutate1D.Sortable- Specified by:
sortDescendingin classPlainArray<N extends Scalar<N>>
-
add
protected final void add(int index, java.lang.Comparable<?> addend)- Specified by:
addin classPlainArray<N extends Scalar<N>>
-
fillOne
protected final void fillOne(int index, Access1D<?> values, long valueIndex)- Specified by:
fillOnein classPlainArray<N extends Scalar<N>>
-
indexOfLargest
protected final int indexOfLargest(int first, int limit, int step)- Specified by:
indexOfLargestin classPlainArray<N extends Scalar<N>>
-
isAbsolute
protected final boolean isAbsolute(int index)
- Specified by:
isAbsolutein classPlainArray<N extends Scalar<N>>- See Also:
Scalar.isAbsolute()
-
isSmall
protected final boolean isSmall(int index, double comparedTo)- Specified by:
isSmallin classPlainArray<N extends Scalar<N>>- See Also:
NormedVectorSpace.isSmall(double)
-
-