Class FloatingPointReceptacle
java.lang.Object
org.ojalgo.type.FloatingPointReceptacle
An array (double[] or float[]) builder/converter. The arrays are built by prepending/appending segments of
anything that can be converted to either double[] or float[] arrays. The total/aggregated arrays are
extracted by calling
supplyTo(double[]) or supplyTo(float[]). This also serves as a type
converter from any number type to double or float.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(double... part) voidappend(float... part) voidappend(int count, double value) voidappend(int count, float value) voidappend(List<? extends Comparable<?>> part) voidvoidvoidclear()private intcopy(double[] source, double[] destination, int offset) private intcopy(double[] source, float[] destination, int offset) private intcopy(float[] source, double[] destination, int offset) private intcopy(float[] source, float[] destination, int offset) private intcopy(List<? extends Comparable<?>> source, double[] destination, int offset) private intcopy(List<? extends Comparable<?>> source, float[] destination, int offset) private intprivate intstatic FloatingPointReceptacleof(double... values) static FloatingPointReceptacleof(float... values) static FloatingPointReceptacleof(int count, double value) static FloatingPointReceptacleof(int count, float value) static FloatingPointReceptacleof(List<? extends Comparable<?>> values) static FloatingPointReceptaclevoidprepend(double... part) voidprepend(float... part) voidprepend(int count, double value) voidprepend(int count, float value) voidprepend(List<? extends Comparable<?>> part) voidvoidintsize()voidsupplyTo(double[] destination) private intsupplyTo(double[] destination, int offset) voidsupplyTo(float[] destination) private intsupplyTo(float[] destination, int offset) double[]Will create a new array with each call.float[]toFloats()Will create a new array with each call.
-
Field Details
-
myContents
-
mySize
private int mySize
-
-
Constructor Details
-
FloatingPointReceptacle
public FloatingPointReceptacle()
-
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
append
-
append
public void append(double... part) -
append
public void append(float... part) -
append
-
append
public void append(int count, double value) -
append
public void append(int count, float value) -
append
-
clear
public void clear() -
prepend
-
prepend
public void prepend(double... part) -
prepend
public void prepend(float... part) -
prepend
-
prepend
public void prepend(int count, double value) -
prepend
public void prepend(int count, float value) -
prepend
-
size
public int size() -
supplyTo
public void supplyTo(double[] destination) -
supplyTo
public void supplyTo(float[] destination) -
toDoubles
public double[] toDoubles()Will create a new array with each call. It would be much more efficient if possible to reuse array and instead callsupplyTo(double[]). -
toFloats
public float[] toFloats()Will create a new array with each call. It would be much more efficient if possible to reuse array and instead callsupplyTo(float[]). -
copy
-
copy
-
copy
private int copy(double[] source, double[] destination, int offset) -
copy
private int copy(double[] source, float[] destination, int offset) -
copy
private int copy(float[] source, double[] destination, int offset) -
copy
private int copy(float[] source, float[] destination, int offset) -
copy
-
copy
-
supplyTo
private int supplyTo(double[] destination, int offset) -
supplyTo
private int supplyTo(float[] destination, int offset)
-