org.apache.commons.math3.util.Incrementor Java Examples

The following examples show how to use org.apache.commons.math3.util.Incrementor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Math_7_AbstractIntegrator_s.java    From coming with MIT License 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #2
Source File: Nopol2017_0077_s.java    From coming with MIT License 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #3
Source File: Math_6_BaseOptimizer_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(Integer.MAX_VALUE, new MaxIterCallback());
}
 
Example #4
Source File: Cardumen_0050_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #5
Source File: Arja_0038_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #6
Source File: Arja_0038_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #7
Source File: Arja_0084_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #8
Source File: Arja_0084_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #9
Source File: 1_BaseOptimizer.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #10
Source File: 1_BaseOptimizer.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #11
Source File: 1_BaseOptimizer.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #12
Source File: 1_BaseOptimizer.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #13
Source File: Cardumen_0050_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #14
Source File: Math_6_BaseOptimizer_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(0, new MaxIterCallback());
}
 
Example #15
Source File: Math_7_AbstractIntegrator_t.java    From coming with MIT License 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #16
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #17
Source File: LeastSquaresFactory.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Count the evaluations of a particular problem. The {@code counter} will be
 * incremented every time {@link LeastSquaresProblem#evaluate(RealVector)} is called on
 * the <em>returned</em> problem.
 *
 * @param problem the problem to track.
 * @param counter the counter to increment.
 * @return a least squares problem that tracks evaluations
 */
public static LeastSquaresProblem countEvaluations(final LeastSquaresProblem problem,
                                                   final Incrementor counter) {
    return new LeastSquaresAdapter(problem) {

        public Evaluation evaluate(final RealVector point) {
            counter.incrementCount();
            return super.evaluate(point);
        }

        // Delegate the rest.
    };
}
 
Example #18
Source File: LeastSquaresFactory.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Count the evaluations of a particular problem. The {@code counter} will be
 * incremented every time {@link LeastSquaresProblem#evaluate(RealVector)} is called on
 * the <em>returned</em> problem.
 *
 * @param problem the problem to track.
 * @param counter the counter to increment.
 * @return a least squares problem that tracks evaluations
 */
public static LeastSquaresProblem countEvaluations(final LeastSquaresProblem problem,
                                                   final Incrementor counter) {
    return new LeastSquaresAdapter(problem) {

        public Evaluation evaluate(final RealVector point) {
            counter.incrementCount();
            return super.evaluate(point);
        }

        // Delegate the rest.
    };
}
 
Example #19
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #20
Source File: BaseOptimizer.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 * @param maxEval Maximum number of objective function evaluations.
 * @param maxIter Maximum number of algorithm iterations.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker,
                        int maxEval,
                        int maxIter) {
    this.checker = checker;

    evaluations = new Incrementor(maxEval, new MaxEvalCallback());
    iterations = new Incrementor(maxIter, new MaxIterCallback());
}
 
Example #21
Source File: BaseOptimizer.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 * @param maxEval Maximum number of objective function evaluations.
 * @param maxIter Maximum number of algorithm iterations.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker,
                        int maxEval,
                        int maxIter) {
    this.checker = checker;

    evaluations = new Incrementor(maxEval, new MaxEvalCallback());
    iterations = new Incrementor(maxIter, new MaxIterCallback());
}
 
Example #22
Source File: BaseOptimizer.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 * @param maxEval Maximum number of objective function evaluations.
 * @param maxIter Maximum number of algorithm iterations.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker,
                        int maxEval,
                        int maxIter) {
    this.checker = checker;

    evaluations = new Incrementor(maxEval, new MaxEvalCallback());
    iterations = new Incrementor(maxIter, new MaxIterCallback());
}
 
Example #23
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #24
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #25
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #26
Source File: BaseOptimizer.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
    this.checker = checker;

    evaluations = new Incrementor(0, new MaxEvalCallback());
    iterations = new Incrementor(Integer.MAX_VALUE, new MaxIterCallback());
}
 
Example #27
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #28
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}
 
Example #29
Source File: BaseOptimizer.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param checker Convergence checker.
 * @param maxEval Maximum number of objective function evaluations.
 * @param maxIter Maximum number of algorithm iterations.
 */
protected BaseOptimizer(ConvergenceChecker<PAIR> checker,
                        int maxEval,
                        int maxIter) {
    this.checker = checker;

    evaluations = new Incrementor(maxEval, new MaxEvalCallback());
    iterations = new Incrementor(maxIter, new MaxIterCallback());
}
 
Example #30
Source File: AbstractIntegrator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/** Build an instance.
 * @param name name of the method
 */
public AbstractIntegrator(final String name) {
    this.name = name;
    stepHandlers = new ArrayList<StepHandler>();
    stepStart = Double.NaN;
    stepSize  = Double.NaN;
    eventsStates = new ArrayList<EventState>();
    statesInitialized = false;
    evaluations = new Incrementor();
    setMaxEvaluations(-1);
    evaluations.resetCount();
}