Examples of Funktion


Examples of eas.startSetup.arrowGUI.funktionen2D.Funktion

        this.reset();
        this.applyDeclarations(code);

        String codeWithoutDeclarations = this.getCodeWithoutDeclarations(code);
        this.calcCode = codeWithoutDeclarations.substring(5);
        Funktion f = new Funktion();
        f = f.convertStoFunk(this.calcCode);
        this.calcCode = f.wohlgeklammertLaTeX(this.calcCode, 0);
        this.calcCode = this.calcCode.replaceAll("\\(", "{\\\\left(");
        this.calcCode = this.calcCode.replaceAll("\\)", "\\\\right)}");
        this.calcCode = this.calcCode.replace("*", "\\cdot ") + "=";
       
        if (this.alwaysShowCompleteTable || this.calcCode.contains("x") || this.calcCode.contains("y")) {
            if (!alwaysShowCompleteTable) {
                if (!this.calcCode.contains("x")) {
                    this.xMax = this.xMin;
                }
                if (!this.calcCode.contains("y")) {
                    this.yMax = this.yMin;
                }
            }
           
            String cols = "|c||";
            for (double y = yMin; y <= yMax; y += (yMax - yMin + 1) / yNum) {
                cols += "c|";
            }
           
            this.calcCode += "\n\\\\\\mbox{\\begin{tabular}{" + cols + "}\n";
            this.calcCode += "\\hline\n";
            this.calcCode += "$x\\backslash y$ ";
            for (double y = yMin; y <= yMax; y += (yMax - yMin + 1) / yNum) {
                this.calcCode += " & $" + StaticMethods.round(y, this.roundDigits) + "$";
            }
            this.calcCode += "\\\\\\hline\\hline\n";

            for (double x = xMin; x <= xMax; x += (xMax - xMin + 1) / xNum) {
                this.calcCode += "$" + StaticMethods.round(x, this.roundDigits) + "$";
                for (double y = yMin; y <= yMax; y += (yMax - yMin + 1) / yNum) {
                    this.calcCode += " & $" + StaticMethods.round(f.eval(x, y), this.roundDigits) + "$";
                }
                this.calcCode += "\\\\\\hline\n";
            }
           
            this.calcCode += "\\end{tabular}}";
        } else {
            this.eval = f.eval(0, 0) + "";
            this.calcCode += this.eval;
        }
    }
View Full Code Here

Examples of eas.startSetup.arrowGUI.funktionen2D.Funktion

     *
     * @param fs
     *            Die Funktion.
     */
    private void setzeDickenFunk(final String fs) {
        Funktion f = (new Funktion()).convertStoFunk(fs);
        final int ypsilon;
        ArrayList<Double> neuDick = new ArrayList<Double>(
                this.aktGrph.getPfeilPol().nPoints());

        Integer anfang = this.aktGrph.getMark1();
        Integer ende = this.aktGrph.getMark2();
       
        if (anfang == null) {
            anfang = 0;
        }
        if (ende == null) {
            ende = this.aktGrph.getPfeilPol().nPoints() - 1;
        }
       
        int zwisch;
        if (anfang > ende) {
            zwisch = ende;
            ende = anfang;
            anfang = zwisch;
        }
       
        ypsilon = ende - anfang + 1;
       
        for (int ix = 0; ix < anfang; ix++) {
            neuDick.add(this.aktGrph.getDicken().get(ix));
        }
       
        for (int ix = anfang; ix <= ende; ix++) {
            neuDick.add(f.eval(ix - anfang, ypsilon));
        }

        for (int ix = ende + 1; ix < this.aktGrph.getPfeilPol().nPoints(); ix++) {
            neuDick.add(this.aktGrph.getDicken().get(ix));
        }
View Full Code Here

Examples of fmg.fmg8.pfeilGUI.funktionen2D.Funktion

     *
     * @param fs
     *            Die Funktion.
     */
    private void setzeDickenFunk(final String fs) {
        Funktion f = (new Funktion()).convertStoFunk(fs);
        final int ypsilon;
        ArrayList<Double> neuDick = new ArrayList<Double>(
                this.aktGrph.getPfeilPol().size());

        Integer anfang = this.aktGrph.getMark1();
        Integer ende = this.aktGrph.getMark2();
       
        if (anfang == null) {
            anfang = 0;
        }
        if (ende == null) {
            ende = this.aktGrph.getPfeilPol().size() - 1;
        }
       
        int zwisch;
        if (anfang > ende) {
            zwisch = ende;
            ende = anfang;
            anfang = zwisch;
        }
       
        ypsilon = ende - anfang + 1;
       
        for (int ix = 0; ix < anfang; ix++) {
            neuDick.add(this.aktGrph.getDicken().get(ix));
        }
       
        for (int ix = anfang; ix <= ende; ix++) {
            neuDick.add(f.eval(ix - anfang, ypsilon));
        }

        for (int ix = ende + 1; ix < this.aktGrph.getPfeilPol().size(); ix++) {
            neuDick.add(this.aktGrph.getDicken().get(ix));
        }
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.