Examples of IntervalsSet


Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

     * @param end end point
     * @return an interval set
     */
    private static IntervalsSet buildIntervalSet(final Vector2D start, final Vector2D end) {
        final Line line = new Line(start, end);
        return new IntervalsSet(line.toSubSpace(start).getX(),
                                line.toSubSpace(end).getX());
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

        final BSPTree<Euclidean1D> minusTree = getRemainingRegion().isEmpty(splitTree.getMinus()) ?
                                               new BSPTree<Euclidean1D>(Boolean.FALSE) :
                                               new BSPTree<Euclidean1D>(subMinus, new BSPTree<Euclidean1D>(Boolean.FALSE),
                                                                        splitTree.getMinus(), null);

        return new SplitSubHyperplane<Euclidean2D>(new SubLine(thisLine.copySelf(), new IntervalsSet(plusTree)),
                                                   new SubLine(thisLine.copySelf(), new IntervalsSet(minusTree)));

    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

    /** Build a sub-line covering the whole line.
     * @return a sub-line covering the whole line
     */
    public SubLine wholeLine() {
        return new SubLine(this, new IntervalsSet(tolerance));
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

        return tolerance;
    }

    /** {@inheritDoc} */
    public SubLine wholeHyperplane() {
        return new SubLine(this, new IntervalsSet(tolerance));
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

     * @exception MathIllegalArgumentException if the points are equal
     */
    private static IntervalsSet buildIntervalSet(final Vector3D start, final Vector3D end, final double tolerance)
        throws MathIllegalArgumentException {
        final Line line = new Line(start, end, tolerance);
        return new IntervalsSet(line.toSubSpace((Point<Euclidean3D>) start).getX(),
                                line.toSubSpace((Point<Euclidean3D>) end).getX(),
                                tolerance);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

        Vector2D current = loop[loop.length - 1];
        for (int i = 0; i < loop.length; ++i) {
            final Vector2D previous = current;
            current = loop[i];
            final Line   line   = new Line(previous, current, tolerance);
            final IntervalsSet region =
                new IntervalsSet(line.toSubSpace((Point<Euclidean2D>) previous).getX(),
                                 line.toSubSpace((Point<Euclidean2D>) current).getX(),
                                 tolerance);
            edges.add(new SubLine(line, region));
        }
        polygon = new PolygonsSet(edges, tolerance);
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

     * @param tolerance tolerance below which points are considered identical
     * @return an interval set
     */
    private static IntervalsSet buildIntervalSet(final Vector2D start, final Vector2D end, final double tolerance) {
        final Line line = new Line(start, end, tolerance);
        return new IntervalsSet(line.toSubSpace((Point<Euclidean2D>) start).getX(),
                                line.toSubSpace((Point<Euclidean2D>) end).getX(),
                                tolerance);
    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

        final BSPTree<Euclidean1D> minusTree = getRemainingRegion().isEmpty(splitTree.getMinus()) ?
                                               new BSPTree<Euclidean1D>(Boolean.FALSE) :
                                               new BSPTree<Euclidean1D>(subMinus, new BSPTree<Euclidean1D>(Boolean.FALSE),
                                                                        splitTree.getMinus(), null);

        return new SplitSubHyperplane<Euclidean2D>(new SubLine(thisLine.copySelf(), new IntervalsSet(plusTree, tolerance)),
                                                   new SubLine(thisLine.copySelf(), new IntervalsSet(minusTree, tolerance)));

    }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

                                                new Vector2D(1.0, 2.0), 1.0e-10)
        };

        BSPTree<Euclidean2D> node1 =
            new BSPTree<Euclidean2D>(new SubLine(l[0],
                                          new IntervalsSet(intersectionAbscissa(l[0], l[1]),
                                                           intersectionAbscissa(l[0], l[2]),
                                                           1.0e-10)),
                                                           new BSPTree<Euclidean2D>(Boolean.TRUE), new BSPTree<Euclidean2D>(Boolean.FALSE),
                                                           null);
        BSPTree<Euclidean2D> node2 =
            new BSPTree<Euclidean2D>(new SubLine(l[1],
                                          new IntervalsSet(intersectionAbscissa(l[1], l[2]),
                                                           intersectionAbscissa(l[1], l[3]),
                                                           1.0e-10)),
                                                           node1, new BSPTree<Euclidean2D>(Boolean.FALSE), null);
        BSPTree<Euclidean2D> node3 =
            new BSPTree<Euclidean2D>(new SubLine(l[2],
                                          new IntervalsSet(intersectionAbscissa(l[2], l[3]),
                                                           Double.POSITIVE_INFINITY, 1.0e-10)),
                                                           node2, new BSPTree<Euclidean2D>(Boolean.FALSE), null);
        BSPTree<Euclidean2D> node4 =
            new BSPTree<Euclidean2D>(l[3].wholeHyperplane(), node3, new BSPTree<Euclidean2D>(Boolean.FALSE), null);
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.oned.IntervalsSet

        ? Double.NEGATIVE_INFINITY
        : (line.toSubSpace(start)).getX();
        double upper = startIsVirtual
        ? (line.toSubSpace(end)).getX()
        : Double.POSITIVE_INFINITY;
        return new SubLine(line, new IntervalsSet(lower, upper, 1.0e-10));
    }
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.