Package statechum.analysis.learning.experiments.TestAbstractExperiment

Examples of statechum.analysis.learning.experiments.TestAbstractExperiment.whatToRun


    final int    Ai [ ] = { 010,   24123,   4214} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
    final double b [ ] = {8., 45., -3., 3., 19.} ;
    final double x[] = new double[b.length];
   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"zero-sized problem");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"zero-sized problem");   
  }
View Full Code Here


    final int    Ai [ ] = { 010,   24123,   4214} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
    final double b [ ] = {8., 45., -3., 3., 19.} ;
    final double x[] = new double[b.length];
   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
  }
View Full Code Here

    final int    Ai [ ] = { 010,   24123,   4214} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
    final double b [ ] = {8., 45., -3., 3., 19.} ;
    final double x[] = new double[b.length];
   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"too few");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"too few");   
  }
View Full Code Here

    final int    Ai [ ] = { 010,   24123,   4214} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
    final double b [ ] = {8., 45., -3., 3., 19.} ;
    final double x[] = new double[b.length];
   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"Ap[0] should be 0");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"Ap[0] should be 0");   
  }
View Full Code Here

    final int    Ai [ ] = { 010,   24123,   4214,9999} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
    final double b [ ] = {8., 45., -3., 3., 19.} ;
    final double x[] = new double[b.length];

    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
  }
View Full Code Here

    final int    Ai [ ] = { 010,   24123,   4214} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.,9999} ;
    final double b [ ] = {8., 45., -3., 3., 19.} ;
    final double x[] = new double[b.length];

    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
  }
View Full Code Here

    final int    Ai [ ] = { 010,   24123,   4214} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
    final double b [ ] = {8., 45., -3., 3., 19.,99999} ;
    final double x[] = new double[b.length];
   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
  }
View Full Code Here

    final int    Ai [ ] = { 010,   24123,   4214} ;
    final double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ;
    final double b [ ] = {8., 45., -3., 3., 19.} ;
    final double x[] = new double[b.length+6];
   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LSolver.extsolve(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        new LSolver(Ap, Ai, Ax, b, x);
      }
    }, IllegalArgumentException.class,"inconsistent dimension");   
  }
View Full Code Here

    final LSolver solver = new LSolver(matrix,DoubleFactory1D.dense.make(new double[]{8., 45., -3., 3., 19.}));
    final DoubleMatrix1D x = DoubleFactory1D.dense.make(testMatrix.rows());
   
    for(int i=0;i<solver.j_b.length;++i) x.setQuick(i, solver.j_b[i]);
   
    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        solver.solveExternally();
      }
    }, IllegalArgumentException.class,"singular");   

    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        LUDecompositionQuick coltSolver = new LUDecompositionQuick();
        coltSolver.decompose(matrix);coltSolver.setLU(matrix);
        coltSolver.solve(x);
      }
    }, IllegalArgumentException.class,"singular");   

    TestAbstractExperiment.checkForCorrectException(new whatToRun() {
      public void run() throws NumberFormatException {
        for(int i=0;i<testMatrix.rows();++i) solver.j_x[i]=0;
        solver.solveUsingColt();
      }
    }, IllegalArgumentException.class,"singular");   
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.experiments.TestAbstractExperiment.whatToRun

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.