mathcomp.gridgeom
Class Triangle

java.lang.Object
  extended by mathcomp.gridgeom.Triangle
All Implemented Interfaces:
Geometric

public class Triangle
extends java.lang.Object
implements Geometric

A Triangle consists of three nodes and three edges.

Author:
pht

Constructor Summary
Triangle(Edge[] edges)
           
Triangle(Node[] nodes)
           
Triangle(Triangle old)
           
 
Method Summary
 boolean containsNode(Node node)
           
 java.util.List createNodesList()
          Returns the points.
 double getArea()
           
 Edge getEdge(int i)
          Returns the edge.
 double getEdgeLength(int i)
           
 int getLocalEdgeNumber(Edge edge)
           
 int getLocalNodeNumber(Node node)
           
 double getMaxEdgeLen()
           
 Node getMiddleNode()
           
 double getMinEdgeLen()
           
 Node getNode(int i)
          Returns the knot.
 Node node(int i)
          Returns the i-th node.
 int nodesCount()
          Number of nodes.
 void setEdge(int i, Edge e)
           
 void setEdgeWithReplacing(int i, Triangle old, Edge e)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Triangle

public Triangle(Node[] nodes)

Triangle

public Triangle(Edge[] edges)

Triangle

public Triangle(Triangle old)
Method Detail

getEdge

public Edge getEdge(int i)
Returns the edge.

Returns:
Edge

setEdge

public void setEdge(int i,
                    Edge e)

setEdgeWithReplacing

public void setEdgeWithReplacing(int i,
                                 Triangle old,
                                 Edge e)

createNodesList

public java.util.List createNodesList()
Returns the points.

Returns:
List

getNode

public Node getNode(int i)
Returns the knot.

Returns:
Knot

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getEdgeLength

public double getEdgeLength(int i)

getMaxEdgeLen

public double getMaxEdgeLen()

getMinEdgeLen

public double getMinEdgeLen()

getArea

public double getArea()

getMiddleNode

public Node getMiddleNode()

containsNode

public boolean containsNode(Node node)

getLocalNodeNumber

public int getLocalNodeNumber(Node node)

getLocalEdgeNumber

public int getLocalEdgeNumber(Edge edge)

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