mathcomp.gridgeom
Class Edge
java.lang.Object
mathcomp.gridgeom.Edge
- All Implemented Interfaces:
- java.lang.Comparable, Geometric
public class Edge
- extends java.lang.Object
- implements java.lang.Comparable, Geometric
An edge consists of two Nodes and (at most) two adjacent
Triangles.
The implementation of Object.hashCode() depends on Commons Lang.
- Author:
- pht
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Edge
public Edge(Node a,
Node b)
Edge
public Edge(Edge old)
getOtherNode
public Node getOtherNode(Node node)
getMiddleNode
public Node getMiddleNode()
setOtherTriangle
public void setOtherTriangle(Triangle o,
Triangle n)
replaceTriangle
public void replaceTriangle(Triangle o,
Triangle n)
addTriangle
public void addTriangle(Triangle n)
getTriangle
public Triangle getTriangle(int i)
getOtherTriangle
public Triangle getOtherTriangle(Triangle r)
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo in interface java.lang.Comparable
nodesCount
public int nodesCount()
- Description copied from interface:
Geometric
- Number of nodes.
- Specified by:
nodesCount in interface Geometric
- Returns:
- number of nodes
node
public Node node(int i)
- Description copied from interface:
Geometric
- Returns the
i-th node.
- Specified by:
node in interface Geometric
- Returns:
i-th node
getNode
public Node getNode(int i)
contains
public boolean contains(Node n)
getLength
public double getLength()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object