infovis.graph
Class Algorithms

java.lang.Object
  extended by infovis.graph.Algorithms

public class Algorithms
extends Object

Version:
$Revision: 1.13 $
Author:
Jean-Daniel Fekete

Constructor Summary
Algorithms()
           
 
Method Summary
static OpenIntIntHashMap copy(Graph fromGraph, Graph toGraph)
          Copy one graph into another.
static void findComponent(Graph g, int vertex, AbstractIntIntMap map)
           
static Graph getGridGraph(int width, int height)
           
static Graph getOneCompnentGraph()
          Returns a bigger, undirected test graph with a just one component.
static int labelConnectedComponents(Graph graph, IntColumn labels, IntColumn sizes)
           
static int[] sortEdges(Graph graph, int vertex, RowComparator comp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Algorithms

public Algorithms()
Method Detail

sortEdges

public static int[] sortEdges(Graph graph,
                              int vertex,
                              RowComparator comp)

copy

public static OpenIntIntHashMap copy(Graph fromGraph,
                                     Graph toGraph)
Copy one graph into another.

Parameters:
fromGraph - the source graph
toGraph - the destination graph
Returns:
the mapping from the vertices in the source graph to the vertices in the destination graph.

getOneCompnentGraph

public static Graph getOneCompnentGraph()
Returns a bigger, undirected test graph with a just one component. This graph consists of a clique of ten edges, a partial clique (randomly generated, with edges of 0.6 probability), and one series of edges running from the first node to the last. Adapted from JUNG (jung.sourceforge.net)

Returns:
the testgraph

getGridGraph

public static Graph getGridGraph(int width,
                                 int height)

findComponent

public static void findComponent(Graph g,
                                 int vertex,
                                 AbstractIntIntMap map)

labelConnectedComponents

public static int labelConnectedComponents(Graph graph,
                                           IntColumn labels,
                                           IntColumn sizes)


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.