Package org.ojalgo.array
Class StrategyBuildingFactory<N extends java.lang.Comparable<N>,I extends Access1D<N>,SB extends StrategyBuildingFactory<N,I,SB>>
- java.lang.Object
-
- org.ojalgo.array.StrategyBuildingFactory<N,I,SB>
-
- Direct Known Subclasses:
LongToNumberMap.MapFactory
,NumberList.ListFactory
,SparseArray.SparseFactory
public abstract class StrategyBuildingFactory<N extends java.lang.Comparable<N>,I extends Access1D<N>,SB extends StrategyBuildingFactory<N,I,SB>> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private DenseArray.Factory<N>
myDenseFactory
private GrowthStrategy.Builder
myStrategyBuilder
-
Constructor Summary
Constructors Constructor Description StrategyBuildingFactory(DenseArray.Factory<N> denseFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SB
chunk(long chunk)
FunctionSet<N>
function()
(package private) DenseArray.Factory<N>
getDenseFactory()
(package private) GrowthStrategy
getGrowthStrategy()
MathType
getMathType()
SB
initial(long initial)
Scalar.Factory<N>
scalar()
SB
segment(long segment)
With very large data structures, particularly sparse ones, the underlying (dense) storage is segmented.
-
-
-
Field Detail
-
myDenseFactory
private final DenseArray.Factory<N extends java.lang.Comparable<N>> myDenseFactory
-
myStrategyBuilder
private final GrowthStrategy.Builder myStrategyBuilder
-
-
Constructor Detail
-
StrategyBuildingFactory
public StrategyBuildingFactory(DenseArray.Factory<N> denseFactory)
-
-
Method Detail
-
chunk
public SB chunk(long 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
-
function
public FunctionSet<N> function()
-
getMathType
public MathType getMathType()
-
initial
public SB initial(long initial)
- Parameters:
initial
- Sets the initial capacity of the "arrays" to be created using this factory.- Returns:
- this
-
scalar
public Scalar.Factory<N> scalar()
-
segment
public SB segment(long 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.)
-
getDenseFactory
DenseArray.Factory<N> getDenseFactory()
-
getGrowthStrategy
GrowthStrategy getGrowthStrategy()
-
-