Package uk.ac.cranfield.thesis.shared.exception

Examples of uk.ac.cranfield.thesis.shared.exception.IncorrectODEEquationException


       
        for (String s : data)
        {
            String[] values = s.split("=");
            if (values.length < 2)
                throw new IncorrectODEEquationException("Wrong input of initial values");
           
            int i = longestRun(values[0], '\'', 1);
            result.set(i, Double.valueOf(values[1]));
        }
       
View Full Code Here


        List<String> f = getFunctionVector(equation);
        Solution solution = rungeKuttaSolverServiceImpl.solve(equation, step, start, start + 2 * step);
        solution.setMax(stop);
       
        if (solution.getResults().size() < 3)
            throw new IncorrectODEEquationException("Error : Not enough initial values to solve equation");
       
        List<Double> yn_2 = new ArrayList<Double>();
        yn_2.add(solution.getResult(0));
       
        List<Double> yn_1 = new ArrayList<Double>();
View Full Code Here

        List<Solution> result = rungeKuttaSolverServiceImpl.solveSystem(system, step, start, start + 2 * step);
       
        for (Solution s : result)
        {
            if (s.getResults().size() < 3)
                throw new IncorrectODEEquationException(
                        "Error : Not enough initial values to solve system of equations");
            s.setMax(stop);
        }
       
        List<List<Double>> yn_2 = new ArrayList<List<Double>>();
View Full Code Here

    protected String parseFunctionEquation(Equation equation) throws IncorrectODEEquationException
    {
        String[] eq = equation.getEquation().split("=");
       
        if (eq.length < 2)
            throw new IncorrectODEEquationException("Given equation has incorrect form , lack of assignment sign ( = )");
       
        int i = 0;
        int len = eq[1].length();
        String result = "";
        while (i < len)
View Full Code Here

TOP

Related Classes of uk.ac.cranfield.thesis.shared.exception.IncorrectODEEquationException

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.