Class ArrayFactory<N extends Comparable<N>,I extends BasicArray<N>>

java.lang.Object
org.ojalgo.array.ArrayFactory<N,I>
All Implemented Interfaces:
Factory1D<I>, FactorySupplement
Direct Known Subclasses:
BasicArray.Factory, DenseArray.Factory

abstract class ArrayFactory<N extends Comparable<N>,I extends BasicArray<N>> extends Object implements Factory1D<I>
  • Constructor Details

    • ArrayFactory

      ArrayFactory()
  • Method Details

    • function

      public abstract FunctionSet<N> function()
      Specified by:
      function in interface FactorySupplement
    • make

      public I make(int size)
      Specified by:
      make in interface Factory1D<N extends Comparable<N>>
    • make

      public I make(long count)
      Specified by:
      make in interface Factory1D<N extends Comparable<N>>
    • scalar

      public abstract Scalar.Factory<N> scalar()
      Specified by:
      scalar in interface FactorySupplement
    • aggregator

      abstract AggregatorSet<N> aggregator()
    • getCapacityLimit

      abstract long getCapacityLimit()
    • makeSegmented

      SegmentedArray<N> makeSegmented(long... structure)
    • makeStructuredZero

      abstract I makeStructuredZero(long... structure)
      Typically sparse, but if very small then dense If very large then also segmented
    • makeToBeFilled

      abstract I makeToBeFilled(long... structure)
      Always dense, but maybe segmented
    • wrapAsSegments

      @SafeVarargs final SegmentedArray<N> wrapAsSegments(BasicArray<N>... segments)
      There are several requirements on the segments:
      1. All segments, except possibly the last, must have the same length/size/count.
      2. That size must be a power of 2.
      3. The size of the last segment must be invalid input: '<'= "the segment size".
      Throws:
      IllegalArgumentException - if either of the 3 requirements are broken.