org.graffiti.plugins.algorithms.mnn
Class EmbeddedGraph

java.lang.Object
  extended by org.graffiti.plugins.algorithms.mnn.EmbeddedGraph

public class EmbeddedGraph
extends Object

This class calculates an embedding of the graph

Version:
$Revision: 5766 $ $Date: 2010-05-07 19:21:40 +0200 (Fr, 07 Mai 2010) $
Author:
Thomas Ortmeier

Constructor Summary
EmbeddedGraph(Graph graph)
          Constructor
 
Method Summary
 void calculateFaces()
          Calculates all faces of a planar Graph
 List<Edge> getAddedEdges()
          Returs a list of all added edges for the triangulation
 LinkedList<Node> getAdjacentNodes(Node node)
          Returns a LinkedList of the adjacent nodes of a node
 Face getExteriorFace()
          Returns the exterior face
 Face[] getFace(Edge e)
          returns the two faces lying on the Edge e
 Graph getGraph()
          returns the graph
 LinkedList<Node> getInnerFace(Edge e)
          returns the nodes of an inner face for a given edge
 List<Face> getInnerFaces()
          returns a list of all inner faces
 List<Face> getInnerFaces(Node n)
          returns a list of all inner faces for a special node
 int getNumberOfFaces()
          Returns the number of faces of the embedding of the graph
 boolean isExteriorFace(Face f)
           
 boolean isTriangulated()
          Returns true, if the graph is internally triangulated
 String toString()
           
 void triangulate()
          Triagulates the planar Graph internally
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmbeddedGraph

public EmbeddedGraph(Graph graph)
Constructor

Parameters:
graph -
Method Detail

getInnerFaces

public List<Face> getInnerFaces()
returns a list of all inner faces

Returns:
the inner faces

getInnerFaces

public List<Face> getInnerFaces(Node n)
returns a list of all inner faces for a special node

Parameters:
n - the node
Returns:
the inner faces

getInnerFace

public LinkedList<Node> getInnerFace(Edge e)
returns the nodes of an inner face for a given edge

Parameters:
e - the edge
Returns:
the nodes on the inner face for a given edge

getNumberOfFaces

public int getNumberOfFaces()
Returns the number of faces of the embedding of the graph

Returns:
the number of faces

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getExteriorFace

public Face getExteriorFace()
Returns the exterior face


isExteriorFace

public boolean isExteriorFace(Face f)

getGraph

public Graph getGraph()
returns the graph

Returns:
the graph

getAdjacentNodes

public LinkedList<Node> getAdjacentNodes(Node node)
Returns a LinkedList of the adjacent nodes of a node

Parameters:
node -
Returns:
the adjazent nodes in the clockwise order

getAddedEdges

public List<Edge> getAddedEdges()
Returs a list of all added edges for the triangulation

Returns:
the added edges

calculateFaces

public void calculateFaces()
Calculates all faces of a planar Graph


isTriangulated

public boolean isTriangulated()
Returns true, if the graph is internally triangulated

Returns:
true, if the graph is (internally) triangulated

triangulate

public void triangulate()
Triagulates the planar Graph internally


getFace

public Face[] getFace(Edge e)
returns the two faces lying on the Edge e

Parameters:
e - the edge
Returns:
the two faces of e


Generated at 2012-05-30 11:01:25 PM CEST