Examples of DirectedEdge


Examples of org.geotools.graph.structure.DirectedEdge

  /**
   * @see Edge#compareNodes(Edge)
   */
  public int compareNodes(Edge other) {
    if (other instanceof DirectedEdge) {
      DirectedEdge de = (DirectedEdge)other;
      if (de.getInNode().equals(m_in) && de.getOutNode().equals(m_out))
        return(EQUAL_NODE_ORIENTATION);
      if (de.getInNode().equals(m_out) && de.getOutNode().equals(m_in))
        return(OPPOSITE_NODE_ORIENTATION)
    }
    return(UNEQUAL_NODE_ORIENTATION);
  }
View Full Code Here

Examples of org.geotools.graph.structure.DirectedEdge

    built.visitNodes(visitor);
   
    //ensure correct edge direction
    visitor = new GraphVisitor() {
      public int visit(Graphable component) {
        DirectedEdge e = (DirectedEdge)component;
        Coordinate c0 = (Coordinate)e.getInNode().getObject();
        Coordinate c1 = (Coordinate)e.getOutNode().getObject();
        LineSegment ls = (LineSegment)e.getObject();
       
        assertTrue(ls.p0.equals(c0) && ls.p1.equals(c1));
       
        return(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.