Examples of FunctionEvaluationException


Examples of org.apache.commons.math.FunctionEvaluationException

    public double value(final double[] point) throws FunctionEvaluationException {

        // compute residuals
        final double[] residuals = function.value(point);
        if (residuals.length != observations.length) {
            throw new FunctionEvaluationException(point,LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE,
                                        residuals.length, observations.length);
        }
        for (int i = 0; i < residuals.length; ++i) {
            residuals[i] -= observations[i];
        }
View Full Code Here

Examples of org.apache.commons.math.FunctionEvaluationException

     * @exception IllegalArgumentException if the start point dimension is wrong
     */
    protected double evaluate(final double[] x)
        throws FunctionEvaluationException, IllegalArgumentException {
        if (++evaluations > maxEvaluations) {
            throw new FunctionEvaluationException(new MaxEvaluationsExceededException(maxEvaluations), x);
        }
        return f.value(x);
    }
View Full Code Here

Examples of org.apache.commons.math.FunctionEvaluationException

     */
    protected void updateJacobian() throws FunctionEvaluationException {
        ++jacobianEvaluations;
        jacobian = jF.value(point);
        if (jacobian.length != rows) {
            throw new FunctionEvaluationException(point, LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE,
                                                  jacobian.length, rows);
        }
        for (int i = 0; i < rows; i++) {
            final double[] ji = jacobian[i];
            double wi = FastMath.sqrt(residualsWeights[i]);
View Full Code Here

Examples of org.apache.commons.math.FunctionEvaluationException

     */
    protected void updateResidualsAndCost()
        throws FunctionEvaluationException {

        if (++objectiveEvaluations > maxEvaluations) {
            throw new FunctionEvaluationException(new MaxEvaluationsExceededException(maxEvaluations),
                                                  point);
        }
        objective = function.value(point);
        if (objective.length != rows) {
            throw new FunctionEvaluationException(point, LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE,
                                                  objective.length, rows);
        }
        cost = 0;
        int index = 0;
        for (int i = 0; i < rows; i++) {
View Full Code Here

Examples of org.apache.commons.math.FunctionEvaluationException

     * of iterations is exceeded
     */
    protected double computeObjectiveValue(final double[] evaluationPoint)
        throws FunctionEvaluationException {
        if (++evaluations > maxEvaluations) {
            throw new FunctionEvaluationException(new MaxEvaluationsExceededException(maxEvaluations),
                                                  evaluationPoint);
        }
        return function.value(evaluationPoint);
    }
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.FunctionEvaluationException

  {
    // Accepts one or two parameters ...
    final CSSValue[] params = function.getParameters();
    if (params.length < 2)
    {
      throw new FunctionEvaluationException();
    }
    final String counterName =
            FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    final String separator =
            FunctionUtilities.resolveString(layoutProcess, element, params[1]);
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.FunctionEvaluationException

      throws FunctionEvaluationException
  {
    final CSSValue[] parameters = function.getParameters();
    if (parameters.length == 0)
    {
      throw new FunctionEvaluationException
          ("One parameter must be given to the 'pending' function.");
    }

    final String name = FunctionUtilities.resolveString
        (layoutProcess, element, parameters[0]);
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.FunctionEvaluationException

          throws FunctionEvaluationException
  {
    final CSSValue[] params = function.getParameters();
    if (params.length != 1)
    {
      throw new FunctionEvaluationException();
    }
    final String name = FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    return new VariableToken(name);
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.FunctionEvaluationException

  {
    // Accepts one or two parameters ...
    final CSSValue[] params = function.getParameters();
    if (params.length < 1)
    {
      throw new FunctionEvaluationException();
    }
    final String counterName =
            FunctionUtilities.resolveString(layoutProcess, element, params[0]);

    CounterStyle cstyle = null;
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.FunctionEvaluationException

      throws FunctionEvaluationException
  {
    final CSSValue[] parameters = function.getParameters();
    if (parameters.length == 0)
    {
      throw new FunctionEvaluationException
          ("One parameter must be given to the 'elements' function.");
    }

    final String name = FunctionUtilities.resolveString
        (layoutProcess, element, parameters[0]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.