Class SparseArray.SparseFactory<N extends Comparable<N>>
java.lang.Object
org.ojalgo.array.BasicArray.BaseFactory<N, BasicArray<N>>
org.ojalgo.array.SparseArray.SparseFactory<N>
- All Implemented Interfaces:
Factory1D<BasicArray<N>>, FactorySupplement
- Enclosing class:
SparseArray<N extends Comparable<N>>
public static final class SparseArray.SparseFactory<N extends Comparable<N>>
extends BasicArray.BaseFactory<N, BasicArray<N>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface Factory1D
Factory1D.Builder<I>, Factory1D.MayBeSparse<I,DENSE, SPARSE>, Factory1D.TwoStep<I, B> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BasicArray.BaseFactory
aggregator, function, getElementSize, getMathType, scalar
-
Field Details
-
myGrowthStrategy
-
myPlainFactory
-
-
Constructor Details
-
SparseFactory
SparseFactory(PlainArray.Factory<N, ?> plainFactory)
-
-
Method Details
-
chunk
- Parameters:
chunk- Defines a capacity break point. Below this point the capacity is doubled when needed. Above it, it is grown by adding one "chunk" at the time. Must be a power of 2. (The builder will enforce that for you.)- Returns:
- this
-
initial
- Parameters:
initial- Sets the initial capacity of the "arrays" to be created using this factory.- Returns:
- this
-
make
-
make
-
segment
With very large data structures, particularly sparse ones, the underlying (dense) storage is segmented. (Very large arrays are implemented as an array of arrays.) This determines the size/length of one such segment. Must be a multiple of the chunk size as well as a power of 2. (The builder will enforce this for you.) -
getCapacityLimit
long getCapacityLimit()Description copied from class:BasicArray.BaseFactoryMax number of elements in this array.- Specified by:
getCapacityLimitin classBasicArray.BaseFactory<N extends Comparable<N>, BasicArray<N extends Comparable<N>>>
-