y.algo
Class GraphChecker

java.lang.Object
  |
  +--y.algo.GraphChecker

public class GraphChecker
extends Object

Provides methods that check structural properties of a given graph.


Constructor Summary
GraphChecker()
           
 
Method Summary
static boolean isAcyclic(Graph graph)
          Checks whether or not the given graph contains to directed cycle.
static boolean isBiconnected(Graph graph)
          Checks whether or not the given graph his biconnected.
static boolean isBipartite(Graph graph)
          Checks whether or not the given graph his bipartite.
static boolean isConnected(Graph graph)
          Checks whether or not the given graph his connected.
static boolean isCyclic(Graph graph)
          Checks whether or not the given graph contains a directed cycle.
static boolean isForest(Graph graph)
          Checks whether or not the given graph is a forest, i.e.
static boolean isMultipleEdgeFree(Graph graph)
          Checks whether or not the given graph contains multiple edges, i.e.
static boolean isNaryTree(Graph graph, int n)
          Checks whether or not the given graph is a rooted tree where each node has a maximum of n children.
static boolean isPlanar(Graph graph)
          Checks whether or not the given graph is planar.
static boolean isRootedTree(Graph graph)
          Checks whether or not the given graph is a rooted tree.
static boolean isSelfLoopFree(Graph graph)
          Checks whether or not the given graph contains selfloops.
static boolean isSimple(Graph graph)
          Checks whether or not the given graph is simple, i.e.
static boolean isTree(Graph graph)
          Checks whether or not the given graph is an undirected tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphChecker

public GraphChecker()
Method Detail

isAcyclic

public static boolean isAcyclic(Graph graph)
Checks whether or not the given graph contains to directed cycle.


isCyclic

public static boolean isCyclic(Graph graph)
Checks whether or not the given graph contains a directed cycle.


isPlanar

public static boolean isPlanar(Graph graph)
Checks whether or not the given graph is planar.


isConnected

public static boolean isConnected(Graph graph)
Checks whether or not the given graph his connected.


isBiconnected

public static boolean isBiconnected(Graph graph)
Checks whether or not the given graph his biconnected.


isBipartite

public static boolean isBipartite(Graph graph)
Checks whether or not the given graph his bipartite.


isNaryTree

public static boolean isNaryTree(Graph graph,
                                 int n)
Checks whether or not the given graph is a rooted tree where each node has a maximum of n children.


isRootedTree

public static boolean isRootedTree(Graph graph)
Checks whether or not the given graph is a rooted tree.


isTree

public static boolean isTree(Graph graph)
Checks whether or not the given graph is an undirected tree.


isForest

public static boolean isForest(Graph graph)
Checks whether or not the given graph is a forest, i.e. a graph whose connected components are rooted trees.


isSelfLoopFree

public static boolean isSelfLoopFree(Graph graph)
Checks whether or not the given graph contains selfloops.


isSimple

public static boolean isSimple(Graph graph)
Checks whether or not the given graph is simple, i.e. contains no two distinct edges e1, e2 where e1.source() == e2.source() && e1.target() == e2.target().


isMultipleEdgeFree

public static boolean isMultipleEdgeFree(Graph graph)
Checks whether or not the given graph contains multiple edges, i.e. contains no two distinct edges e1, e2 that connect the same pairs of nodes in either direction.


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

2003