Search in sources :

Example 6 with NumberContext

use of org.ojalgo.type.context.NumberContext in project ojAlgo by optimatika.

the class SimpleCholeskyCase method setUp.

@BeforeEach
@Override
public void setUp() {
    DEFINITION = new NumberContext(7, 4);
    EVALUATION = new NumberContext(4, 3);
    myBigAA = SimpleCholeskyCase.getFactorL();
    myBigAX = SimpleCholeskyCase.getFactorR();
    myBigAB = SimpleCholeskyCase.getOriginal();
    myBigI = BasicMatrixTest.getIdentity(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    myBigSafe = BasicMatrixTest.getSafe(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    super.setUp();
}
Also used : NumberContext(org.ojalgo.type.context.NumberContext) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 7 with NumberContext

use of org.ojalgo.type.context.NumberContext in project ojAlgo by optimatika.

the class SimpleEquationCase method setUp.

@BeforeEach
@Override
public void setUp() {
    DEFINITION = new NumberContext(7, 1);
    EVALUATION = new NumberContext(7, 9);
    myBigAA = SimpleEquationCase.getBody();
    myBigAX = SimpleEquationCase.getSolution();
    myBigAB = SimpleEquationCase.getRHS();
    myBigI = BasicMatrixTest.getIdentity(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    myBigSafe = BasicMatrixTest.getSafe(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    super.setUp();
}
Also used : NumberContext(org.ojalgo.type.context.NumberContext) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 8 with NumberContext

use of org.ojalgo.type.context.NumberContext in project ojAlgo by optimatika.

the class SimpleLUCase method setUp.

@BeforeEach
@Override
public void setUp() {
    DEFINITION = new NumberContext(7, 1);
    EVALUATION = new NumberContext(7, 9);
    myBigAA = SimpleLUCase.getMtrxL();
    myBigAX = SimpleLUCase.getMtrxU();
    myBigAB = SimpleLUCase.getOrginal();
    myBigI = BasicMatrixTest.getIdentity(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    myBigSafe = BasicMatrixTest.getSafe(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    super.setUp();
}
Also used : NumberContext(org.ojalgo.type.context.NumberContext) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 9 with NumberContext

use of org.ojalgo.type.context.NumberContext in project ojAlgo by optimatika.

the class SimpleLeastSquaresCase method setUp.

@BeforeEach
@Override
public void setUp() {
    DEFINITION = new NumberContext(7, 4);
    // TODO Something must be wrong here!
    EVALUATION = new NumberContext(4, 4);
    myBigAA = SimpleLeastSquaresCase.getFactorR();
    myBigAX = SimpleLeastSquaresCase.getSolution();
    myBigAB = SimpleLeastSquaresCase.getTransformedRHS();
    myBigI = BasicMatrixTest.getIdentity(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    myBigSafe = BasicMatrixTest.getSafe(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    super.setUp();
}
Also used : NumberContext(org.ojalgo.type.context.NumberContext) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 10 with NumberContext

use of org.ojalgo.type.context.NumberContext in project ojAlgo by optimatika.

the class SimpleSingularValueCase method setUp.

@BeforeEach
@Override
public void setUp() {
    DEFINITION = new NumberContext(7, 1);
    EVALUATION = new NumberContext(7, 9);
    myBigAA = SimpleSingularValueCase.getMatrixQ1();
    myBigAX = SimpleSingularValueCase.getMatrixD();
    myBigAB = SimpleSingularValueCase.getOriginal();
    myBigI = BasicMatrixTest.getIdentity(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    myBigSafe = BasicMatrixTest.getSafe(myBigAA.countRows(), myBigAA.countColumns(), DEFINITION);
    super.setUp();
}
Also used : NumberContext(org.ojalgo.type.context.NumberContext) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

NumberContext (org.ojalgo.type.context.NumberContext)91 Test (org.junit.jupiter.api.Test)63 ComplexNumber (org.ojalgo.scalar.ComplexNumber)16 PrimitiveDenseStore (org.ojalgo.matrix.store.PrimitiveDenseStore)15 BigDecimal (java.math.BigDecimal)14 BasicMatrix (org.ojalgo.matrix.BasicMatrix)13 BeforeEach (org.junit.jupiter.api.BeforeEach)12 Result (org.ojalgo.optimisation.Optimisation.Result)12 ExpressionsBasedModel (org.ojalgo.optimisation.ExpressionsBasedModel)9 Expression (org.ojalgo.optimisation.Expression)8 Variable (org.ojalgo.optimisation.Variable)8 PrimitiveMatrix (org.ojalgo.matrix.PrimitiveMatrix)6 Optimisation (org.ojalgo.optimisation.Optimisation)6 Uniform (org.ojalgo.random.Uniform)4 BigArray (org.ojalgo.array.BigArray)3 SimultaneousPrimitive (org.ojalgo.matrix.decomposition.HermitianEvD.SimultaneousPrimitive)3 MatrixStore (org.ojalgo.matrix.store.MatrixStore)3 Tag (org.junit.jupiter.api.Tag)2 RationalMatrix (org.ojalgo.matrix.RationalMatrix)2 Solver (org.ojalgo.matrix.decomposition.MatrixDecomposition.Solver)2