ccvisu
Class CCVisu

java.lang.Object
  extended byccvisu.CCVisu

public class CCVisu
extends java.lang.Object

Main class of the CCVisu package. Contains the main pogram and some auxiliary methods.

Version:
$Revision: 1.3 $; $Date: 2005/09/30 15:28:08 $
Author:
Dirk Beyer

Field Summary
private static int CVS
          CVS log format (only input).
private static int DISP
          Display gaph layout on screen (only output).
static java.lang.String endl
          End of line.
private static int LAY
          Graph layout in textual format.
private static int RSF
          Graph (relation) in relational standard format.
private static int SVG
          Graph layout in SVG format (only output).
private static int VRML
          Graph layout in VRML format (only output).
 
Constructor Summary
CCVisu()
           
 
Method Summary
private static void chkAvail(java.lang.String[] args, int i)
          Checks whether the command line argument at index i has a follower argument.
static void computeLayout(GraphData graph, int nrIterations, int attrExponent, boolean vertRepu, boolean noWeight, float gravitation)
          Compute layout for a given graph.
private static int getFormat(java.lang.String format)
          Transforms the format given as a string into the appropriate integer value.
static void initializeLayout(GraphData graph, int nrDim)
          Compute randomized initial layout for a given graph with the given number of dimensions.
static void main(java.lang.String[] args)
          Main program.
private static void markSpecial(GraphData graph)
          Special marking for certain vertices by setting attributes of the vertex, e.g., color and showName.
private static void printHelp()
          Prints usage information.
private static void printVersion()
          Prints version information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endl

public static final java.lang.String endl
End of line.


CVS

private static final int CVS
CVS log format (only input).

See Also:
Constant Field Values

RSF

private static final int RSF
Graph (relation) in relational standard format.

See Also:
Constant Field Values

LAY

private static final int LAY
Graph layout in textual format.

See Also:
Constant Field Values

VRML

private static final int VRML
Graph layout in VRML format (only output).

See Also:
Constant Field Values

SVG

private static final int SVG
Graph layout in SVG format (only output).

See Also:
Constant Field Values

DISP

private static final int DISP
Display gaph layout on screen (only output).

See Also:
Constant Field Values
Constructor Detail

CCVisu

public CCVisu()
Method Detail

main

public static void main(java.lang.String[] args)
Main program. Performes the following steps. 1) Parses and handles the command line options. 2) Creates the appropriate input reader and reads the input. 3) Computes the layout (if necessary). 4) Creates the appropriate output writer and writes the output.

Parameters:
args - Command line arguments.

printVersion

private static void printVersion()
Prints version information.


printHelp

private static void printHelp()
Prints usage information.


getFormat

private static int getFormat(java.lang.String format)
Transforms the format given as a string into the appropriate integer value.

Parameters:
format - File format string to be transformed to int.
Returns:
File format identifier.

chkAvail

private static void chkAvail(java.lang.String[] args,
                             int i)
Checks whether the command line argument at index i has a follower argument. If there is no follower argument, it exits the program.

Parameters:
args - String array containing the command line arguments.
i - Index to check.

initializeLayout

public static void initializeLayout(GraphData graph,
                                    int nrDim)
Compute randomized initial layout for a given graph with the given number of dimensions.

Parameters:
graph - Graph representation, in/out parameter.
nrDim - Number of dimensions for the initial graph.

computeLayout

public static void computeLayout(GraphData graph,
                                 int nrIterations,
                                 int attrExponent,
                                 boolean vertRepu,
                                 boolean noWeight,
                                 float gravitation)
Compute layout for a given graph.

Parameters:
graph - In/Out parameter representing the graph.
nrIterations - Number of iterations.
attrExponent - Exponent of the Euclidian distance in the attraction term of the energy (default: 1).
vertRepu - Use vertex repulsion instead of edge repulsion, true for vertex repulsion, false for edge repulsion (default: edge repulsion).
noWeight - Use unweighted model by ignoring the edge weights, true for unweighted, false for weighted (default: weighted).
gravitation - Gravitation factor for the Barnes-Hut-procedure, attraction to the barycenter (default: 0.001).

markSpecial

private static void markSpecial(GraphData graph)
Special marking for certain vertices by setting attributes of the vertex, e.g., color and showName. This method is a user-defined method to implement some 'highlighting' functionality.