Examples of norm()


Examples of JSci.maths.vectors.DoubleVector.norm()

        DoubleVector    vecFunc = new DoubleVector(arrFunc);
        DoubleVector    vecTarg = new DoubleVector(arrTarg);
       
        double      dblDis = vecFunc.subtract(vecTarg).norm();

        return dblDis/vecTarg.norm();
    }
   
    /**
     * Build a table of function values for comparison.  Each table row consists
     * of the function index, then corresponding function values, all separated by
View Full Code Here

Examples of com.googlecode.gaal.data.api.Vector.norm()

    public void testNorm() {
        Vector vector = new SparseVector();
        vector.add(10, 3);
        vector.add(20, 4);
        System.out.println(vector);
        assertTrue(vector.norm() == 5);
        vector.add(10, 3);
        vector.add(20, 4);
        System.out.println(vector);
        assertTrue(vector.norm() == 10);
    }
View Full Code Here

Examples of com.googlecode.gaal.data.api.Vector.norm()

        System.out.println(vector);
        assertTrue(vector.norm() == 5);
        vector.add(10, 3);
        vector.add(20, 4);
        System.out.println(vector);
        assertTrue(vector.norm() == 10);
    }

    @Test
    public void testSimilarity() {
        Vector vector1 = new SparseVector();
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.norm()

    @Test
    public void testPolygonize() throws Exception {
        Geometry lines = wktRdr.read("MULTILINESTRING ((100 100, 200 100), (200 100, 300 100), (100 100, 100 200, 200 200), (200 100, 200 200), (200 200, 300 200, 300 100))");
        Geometry output = GeometryFunctions.polygonize(lines);
        Geometry expectedOutput = wktRdr.read("GEOMETRYCOLLECTION (POLYGON ((200 100, 100 100, 100 200, 200 200, 200 100)), POLYGON ((200 100, 200 200, 300 200, 300 100, 200 100)))");
        assertTrue(output.norm().equalsExact(expectedOutput.norm()));
    }
   
    @Test
    public void testSplitPolygon() throws Exception {
        Geometry poly = wktRdr.read("POLYGON ((100 100, 200 200, 200 100, 100 100))");
View Full Code Here

Examples of eas.math.geometry.Vector2D.norm()

        // Wall-Follow:
        final double epsilon = 0.1;
        int wf = 0;
        Vector2D blick = new Vector2D(rob.getBlickrichtung());
        blick.norm();
//        if (Math.abs(blick.y) < epsilon) {
        if (Math.abs(blick.x) < epsilon || Math.abs(blick.y) < epsilon) {
            wf++;
        } else {
            wf--;
View Full Code Here

Examples of eas.math.geometry.Vector2D.norm()

                        pos,
                        env.getNormalizedLOV(PacmanGhostAgent.this.id()),
                        PacmanGhostAgent.ignorelist);

                zwisch = new Vector2D(pos);
                zwisch.norm();
                zwisch.setLength(3);

                pos.sub(zwisch);

                CollisionData collision1 = env.nearestRayCollision(pos,
View Full Code Here

Examples of eas.math.geometry.Vector2D.norm()

                y2 = (int) y2d;
            } else {
                Vector2D v0 = new Vector2D(x2, y2);
                v0.sub(new Vector2D(x1, y1));
                v0.ortho();
                v0.norm();
                v0.mult(12);
               
                x1 += v0.x;
                x2 += v0.x;
                y1 += v0.y;
View Full Code Here

Examples of eas.math.geometry.Vector2D.norm()

            Vector2D v = new Vector2D(x2, y2);
            double dist = new Vector2D(x1, y1).distance(new Vector2D(x2, y2));
           
            v.sub(new Vector2D(x1, y1));
            v.norm();
            v.mult(this.pfeilSpLaenge);
            Vector2D v1 = new Vector2D(x1, y1);
            Vector2D v2 = new Vector2D(x2, y2);
            v2.sub(v);
           
View Full Code Here

Examples of eas.math.geometry.Vector2D.norm()

                            y2 = pol.ypoints[1];

                            Vector2D verschOrtho = new Vector2D(x1, y1);
                            verschOrtho.sub(new Vector2D(x2, y2));
                            Vector2D verschPar = new Vector2D(verschOrtho);
                            verschPar.norm();
                            verschPar.mult(30);
                            verschOrtho.ortho();
                            verschOrtho.norm();
                            verschOrtho.mult(-10);
                            Vector2D versch = new Vector2D(verschPar);
View Full Code Here

Examples of eas.math.geometry.Vector2D.norm()

                    norm = new Vector2D(letzte[j].x, letzte[j].y);
                    norm.sub(new Vector2D(
                            rob.getPosition().x,
                            rob.getPosition().y));
                    norm.ortho();
                    norm.norm();
                   
                    lang = rob.getFitSum();
                   
                    if (lang <= 0) {
                        lang = 5;
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.