fr.umlv.gramofone.graphs
Class Tools

java.lang.Object
  extended by fr.umlv.gramofone.graphs.Tools

public class Tools
extends java.lang.Object

Some tools on graph

Author:
fsikora

Constructor Summary
Tools()
           
 
Method Summary
static java.util.HashMap<java.lang.Integer,java.util.HashSet<java.lang.Integer>> components(MyGraph g)
          Return a hashmap with the connected component of the graph
static void dotty(MyGraph g)
          launch dotty and print the graph
static boolean isConnected(MyGraph g)
          Return true if the graph is connected
static void printErrorMessageAndInterrupt(java.lang.String message)
          Print an cytoscape error message and interrupt the program
static java.util.Set<Edge> spanningTree(MyGraph g)
          Return a spanning tree of the graph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tools

public Tools()
Method Detail

isConnected

public static boolean isConnected(MyGraph g)
Return true if the graph is connected

Parameters:
g -
Returns:

spanningTree

public static java.util.Set<Edge> spanningTree(MyGraph g)
Return a spanning tree of the graph

Parameters:
g -
Returns:

components

public static java.util.HashMap<java.lang.Integer,java.util.HashSet<java.lang.Integer>> components(MyGraph g)
Return a hashmap with the connected component of the graph

Parameters:
g -
Returns:
nbOfTheComponent -> set of nodes in this component

dotty

public static void dotty(MyGraph g)
launch dotty and print the graph


printErrorMessageAndInterrupt

public static void printErrorMessageAndInterrupt(java.lang.String message)
Print an cytoscape error message and interrupt the program

Parameters:
message -