|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.algo.RankAssignments
Provides algorithms for solving the rank assignment problem.
Let G=(V,E) be a directed acyclic graph. Let length(e) denote the minimal length and weight(e) the weight of an edge e. The rank assignment problem is to find values x(v) for all v in V, such that x(v) - x(w) >= length(v,w) for all (v,w) in E, and that the sum weight(v,w)*(x(v)-x(w)) over all (v,w) in E is minimal.
Constructor Summary | |
RankAssignments()
|
Method Summary | |
static int |
simple(Graph g,
int[] rank,
int[] minLength)
This method quickly calculates a tight tree using a highly optimized version of gansners algorithm . |
static int |
simple(Graph g,
NodeMap rank,
EdgeMap minLength)
This method quickly calculates a tight tree using a highly optimized version of gansners algorithm . |
static int |
simplex(Graph g,
NodeMap layer,
DataProvider w,
DataProvider minLength)
Solves the rank assignment problem using the simplex method. |
static int |
simplex(Graph g,
NodeMap layer,
DataProvider w,
DataProvider minLength,
EdgeMap tree,
Node _root,
boolean validRanking)
Similar to RankAssignments.simplex(Graph,NodeMap,DataProvider,DataProvider) . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RankAssignments()
Method Detail |
public static int simplex(Graph g, NodeMap layer, DataProvider w, DataProvider minLength)
The algorithm is based on:
E.R. Gansner et al, A Technique for Drawing Directed Graphs, IEEE Transactions on Software Engineering, Vol.19, No.3, March 1993,
g
- the graph for which the layers are determined.layer
- here the ranking is stored.w
- here the weight of an edge is stored.minLength
- here the minimal length of an edge is stored.
public static int simplex(Graph g, NodeMap layer, DataProvider w, DataProvider minLength, EdgeMap tree, Node _root, boolean validRanking)
RankAssignments.simplex(Graph,NodeMap,DataProvider,DataProvider)
. Additionally
it is possible to provide a valid initial tree solution for the problem.
g
- the graph for which the layers are determined.layer
- here the ranking is stored.w
- here the weight of an edge is stored.minLength
- here the minimal length of an edge is stored.validRanking
- if true
, the argument
layer
contains a valid ranking.tree
- may contain a valid tree solution._root
- the root of the tree solution.
public static int simple(Graph g, NodeMap rank, EdgeMap minLength)
g
- the graph, where all the edes have directions, such that
rank[source] < rank[target] and rank[target] - rank[source] >= minlength[edge]rank
- the initial rankingminLength
- the minimal (tight) lengths for each edge. Values must be
non-negative.
public static int simple(Graph g, int[] rank, int[] minLength)
g
- the graph, where all the edes have directions, such that
rank[source] < rank[target] and rank[target] - rank[source] >= minlength[edge]rank
- the initial rankingminLength
- the minimal (tight) lengths for each edge. Values must be
non-negative.
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |