Search this API

y.layout.planar
Class Face

java.lang.Object
  extended by y.layout.planar.Face

public class Face
extends java.lang.Object

This class represents a face (region) in a planar graph. A face is determined by the cyclic order of its adjacent edges.

 
Your browser does not support SVG content.

Method Summary
 boolean contains(Node node)
          Returns whether a given node is adjacent to the face.
 EdgeCursor edges()
          Returns a cursor over the edges in the face.
 void insertEdges(Edge e1, Edge e2)
          Inserts two edges,which are reverse to each other, into the edge list of the face.
 EdgePairCursor pairs()
          Returns a cursor over the edge-pairs in the face.
 int size()
          Returns the number of darts (edges) in the face.
 java.lang.String toString()
          Returns the edges in the face as string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

size

public int size()
Returns the number of darts (edges) in the face.


contains

public boolean contains(Node node)
Returns whether a given node is adjacent to the face.


edges

public EdgeCursor edges()
Returns a cursor over the edges in the face.

Returns:
An EdgeCursor over the edges in the face.

pairs

public EdgePairCursor pairs()
Returns a cursor over the edge-pairs in the face.

Returns:
an EdgePairCursor over the edge-pairs in the face.

insertEdges

public void insertEdges(Edge e1,
                        Edge e2)
Inserts two edges,which are reverse to each other, into the edge list of the face. This is needed to insert degree 1 nodes into a face

Parameters:
e1 - the first edge to be inserted.
e2 - the second edge to be inserted. Precondition: source(e1) == target(e2) source(e2) == target(e1)

toString

public java.lang.String toString()
Returns the edges in the face as string.

Overrides:
toString in class java.lang.Object
Returns:
A String containing the names of the edges in the face.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.