Class OffHeapArray
- All Implemented Interfaces:
Access1D<Double>, Access1D.Aggregatable<Double>, Access1D.Collectable<Double,Mutate1D>, Access1D.Visitable<Double>, Factory1D.Builder<DenseArray<Double>>, Mutate1D, Mutate1D.Fillable<Double>, Mutate1D.Modifiable<Double>, Structure1D
- Direct Known Subclasses:
OffHeapR032, OffHeapR064, OffHeapZ008, OffHeapZ016, OffHeapZ032, OffHeapZ064
Off heap memory array.
When just instantiated these array classes contain uninitialized memory – memory is allocated but not
initialized. To initialize call Mutate1D.reset(). Explicit initialization is only necessary if your code
depends on having zeros as the default/initial value.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class BasicArray
BasicArray.BaseFactory<N,A> Nested classes/interfaces inherited from interface Access1D
Access1D.Aggregatable<N>, Access1D.Collectable<N,R>, Access1D.ElementView<N>, Access1D.SelectionView<N>, Access1D.Sliceable<N>, Access1D.Visitable<N> Nested classes/interfaces inherited from interface Mutate1D
Mutate1D.Fillable<N>, Mutate1D.Mixable<N>, Mutate1D.Modifiable<N>, Mutate1D.ModifiableReceiver<N>, Mutate1D.Receiver<N>, Mutate1D.SortableNested classes/interfaces inherited from interface Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S,B>, Structure1D.LongIndex, Structure1D.LoopCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longstatic final OffHeapArray.Factorystatic final OffHeapArray.Factorystatic final OffHeapArray.Factorystatic final OffHeapArray.Factorystatic final OffHeapArray.Factorystatic final OffHeapArray.Factory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(int index, double addend) final voidadd(long index, byte addend) final voidadd(long index, double addend) final voidadd(long index, float addend) final voidadd(long index, int addend) final voidadd(long index, long addend) final voidadd(long index, short addend) final longcount()The total number of elements in this structure.protected voidexchange(long firstA, long firstB, long step, long count) voidget(long index) (package private) voidmodify(long extIndex, int intIndex, BinaryFunction<Double> function, Access1D<Double> right) (package private) voidmodify(long extIndex, int intIndex, UnaryFunction<Double> function) (package private) voidmodify(long extIndex, int intIndex, Access1D<Double> left, BinaryFunction<Double> function) voidmodifyOne(long index, UnaryFunction<Double> modifier) final intsize()The total number of elements in this structure.voidvisitOne(long index, VoidFunction<Double> visitor) Methods inherited from class DenseArray
buildMethods inherited from class BasicArray
aggregateRange, equals, factory, fill, fill, getMathType, hashCode, indexOfLargest, indexOfLargest, isPrimitive, modify, modify, modify, modifyAll, modifyMatching, modifyMatching, modifyRange, supplyTo, toString, visit, visitAll, visitRange, wrapInArray1D, wrapInArray2D, wrapInArrayAnyDMethods inherited from interface Access1D
asCollectable1D, asKeyed1D, asList, axpy, byteValue, byteValue, dot, doubleValue, doubleValue, elements, floatValue, floatValue, intValue, intValue, longValue, longValue, nonzeros, select, shortValue, shortValue, supplyTo, toList, toRawCopy1DMethods inherited from interface Access1D.Aggregatable
aggregateAllMethods inherited from interface Access1D.Collectable
collectMethods inherited from interface Mutate1D
reset, set, set, set, set, set, set, set, set, set, set, set, set, setMethods inherited from interface Mutate1D.Fillable
fillAll, fillCompatible, fillMatching, fillMatching, fillMatching, fillMatching, fillRange, fillRange
-
Field Details
-
R032
-
R064
-
Z008
-
Z016
-
Z032
-
Z064
-
myCount
private final long myCount
-
-
Constructor Details
-
OffHeapArray
-
-
Method Details
-
add
public final void add(int index, double addend) -
add
public final void add(long index, byte addend) -
add
public final void add(long index, double addend) -
add
public final void add(long index, float addend) -
add
public final void add(long index, int addend) -
add
public final void add(long index, long addend) -
add
public final void add(long index, short addend) -
count
public final long count()Description copied from interface:Structure1DThe total number of elements in this structure.You only need to implement this method if the structure can contain more than Integer.MAX_VALUE elements.
-
fillAll
-
get
-
modifyOne
-
size
public final int size()Description copied from interface:Structure1DThe total number of elements in this structure. -
visitOne
-
exchange
protected void exchange(long firstA, long firstB, long step, long count) - Overrides:
exchangein classBasicArray<Double>
-
modify
- Specified by:
modifyin classDenseArray<Double>
-
modify
- Specified by:
modifyin classDenseArray<Double>
-
modify
- Specified by:
modifyin classDenseArray<Double>
-