Class LinearCombinationPerformance.Factors
- java.lang.Object
-
- org.apache.commons.numbers.examples.jmh.core.LinearCombinationPerformance.Factors
-
- Direct Known Subclasses:
LinearCombinationPerformance.LengthFactors
- Enclosing class:
- LinearCombinationPerformance
public static class LinearCombinationPerformance.Factors extends Object
The factors to multiply.
-
-
Constructor Summary
Constructors Constructor Description Factors()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getA(int index)
Gets the a factors.double[]
getB(int index)
Gets the b factors.int
getLength()
Gets the length of the array of factors.int
getSize()
Gets the number of scalar products to compute.void
setup()
Create the factors.
-
-
-
Constructor Detail
-
Factors
public Factors()
-
-
Method Detail
-
getLength
public int getLength()
Gets the length of the array of factors. This exists to be overridden by factors of a specific length. The default is to create factors of length 4 for use in the inlined scalar product methods.- Returns:
- the length
-
getSize
public int getSize()
Gets the number of scalar products to compute.- Returns:
- the size
-
getA
public double[] getA(int index)
Gets the a factors.- Parameters:
index
- the index- Returns:
- Factors b.
-
getB
public double[] getB(int index)
Gets the b factors.- Parameters:
index
- the index- Returns:
- Factors b.
-
setup
public void setup()
Create the factors.
-
-