类 HierarchicalBCEngine
java.lang.Object
weka.gui.graphvisualizer.HierarchicalBCEngine
- 所有已实现的接口:
GraphConstants
,LayoutEngine
This class lays out the vertices of a graph in a
hierarchy of vertical levels, with a number of nodes
in each level. The number of levels is the depth of
the deepest child reachable from some parent at level
0. It implements a layout technique as described by
K. Sugiyama, S. Tagawa, and M. Toda. in "Methods for
visual understanding of hierarchical systems", IEEE
Transactions on Systems, Man and Cybernetics,
SMC-11(2):109-125, Feb. 1981.
There have been a few modifications made, however. The crossings function is changed as it was non-linear in time complexity. Furthermore, we don't have any interconnection matrices for each level, instead we just have one big interconnection matrix for the whole graph and a int[][] array which stores the vertices present in each level.
- 版本:
- $Revision: 10503 $ - 24 Apr 2003 - Initial version (Ashraf M. Kibriya)
- 作者:
- Ashraf M. Kibriya (amk14@cs.waikato.ac.nz)
-
字段概要
从接口继承的字段 weka.gui.graphvisualizer.GraphConstants
DIRECTED, DOUBLE, NORMAL, PLURAL_DUMMY, REVERSED, SINGULAR_DUMMY
-
构造器概要
构造器构造器说明SimpleConstructor If we want to instantiate the class first, and if information for nodes and edges is not available.HierarchicalBCEngine
(FastVector nodes, FastVector edges, int nodeWidth, int nodeHeight) Constructor - takes in FastVectors of nodes and edges, and the initial width and height of a nodeHierarchicalBCEngine
(FastVector nodes, FastVector edges, int nodeWidth, int nodeHeight, boolean edgeConcentration) Constructor - takes in FastVectors of nodes and edges, the initial width and height of a node, and a boolean value to indicate if the edges should be concentrated. -
方法概要
修饰符和类型方法说明void
Method to add a LayoutCompleteEventListenervoid
Fires a LayoutCompleteEvent.This method returns a handle to the extra controls panel, so that the visualizing class can add it to some of it's own gui panel.getNodes()
give access to set of graph nodesReturns a handle to the progressBar of this LayoutEngine.void
This method does a complete layout of the graph which includes removing cycles, assigning levels to nodes, reducing edge crossings and laying out the vertices horizontally for better visibility.void
phaseIID
(int lindex, int[][] levels) See Sugiyama et al.void
phaseIIU
(int lindex, int[][] levels) See Sugiyama et al.void
phaseIU
(int lindex, int[][] levels) See Sugiyama et al.void
Method to remove a LayoutCompleteEventListener.void
setNodesEdges
(FastVector nodes, FastVector edges) Sets the nodes and edges for this LayoutEngine.void
setNodeSize
(int nodeWidth, int nodeHeight) Sets the size of a node.
-
构造器详细资料
-
HierarchicalBCEngine
Constructor - takes in FastVectors of nodes and edges, and the initial width and height of a node -
HierarchicalBCEngine
public HierarchicalBCEngine(FastVector nodes, FastVector edges, int nodeWidth, int nodeHeight, boolean edgeConcentration) Constructor - takes in FastVectors of nodes and edges, the initial width and height of a node, and a boolean value to indicate if the edges should be concentrated.- 参数:
nodes
- - FastVector containing all the nodesedges
- - FastVector containing all the edgesnodeWidth
- - A node's allowed widthnodeHeight
- - A node's allowed heightedgeConcentration
- - True: if want to concentrate edges, False: otherwise
-
HierarchicalBCEngine
public HierarchicalBCEngine()SimpleConstructor If we want to instantiate the class first, and if information for nodes and edges is not available. However, we would have to manually provide all the information later on by calling setNodesEdges and setNodeSize methods
-
-
方法详细资料
-
getNodes
give access to set of graph nodes- 指定者:
getNodes
在接口中LayoutEngine
-
getControlPanel
This method returns a handle to the extra controls panel, so that the visualizing class can add it to some of it's own gui panel.- 指定者:
getControlPanel
在接口中LayoutEngine
-
getProgressBar
Returns a handle to the progressBar of this LayoutEngine.- 指定者:
getProgressBar
在接口中LayoutEngine
-
setNodesEdges
Sets the nodes and edges for this LayoutEngine. Must be used if the class created by simple HierarchicalBCEngine() constructor.- 指定者:
setNodesEdges
在接口中LayoutEngine
- 参数:
nodes
- - FastVector containing all the nodesedges
- - FastVector containing all the edges
-
setNodeSize
public void setNodeSize(int nodeWidth, int nodeHeight) Sets the size of a node. This method must be used if the class created by simple HierarchicalBCEngine() constructor.- 指定者:
setNodeSize
在接口中LayoutEngine
- 参数:
nodeWidth
- - A node's allowed widthnodeHeight
- - A node's allowed height
-
addLayoutCompleteEventListener
Method to add a LayoutCompleteEventListener- 指定者:
addLayoutCompleteEventListener
在接口中LayoutEngine
- 参数:
l
- - Listener to receive the LayoutCompleteEvent by this class.
-
removeLayoutCompleteEventListener
Method to remove a LayoutCompleteEventListener.- 指定者:
removeLayoutCompleteEventListener
在接口中LayoutEngine
- 参数:
e
- - The LayoutCompleteEventListener to remove.
-
fireLayoutCompleteEvent
Fires a LayoutCompleteEvent.- 指定者:
fireLayoutCompleteEvent
在接口中LayoutEngine
- 参数:
e
- - The LayoutCompleteEvent to fire
-
layoutGraph
public void layoutGraph()This method does a complete layout of the graph which includes removing cycles, assigning levels to nodes, reducing edge crossings and laying out the vertices horizontally for better visibility. The removing of cycles and assignment of levels is only performed if hasn't been performed earlier or if some layout option has been changed and it is necessary to do so. It is necessary to do so, if the user selects/deselects edge concentration or topdown/bottomup options.The layout is performed in a separate thread and the progress bar of the class is updated for each of the steps as the process continues.
- 指定者:
layoutGraph
在接口中LayoutEngine
-
phaseIU
public void phaseIU(int lindex, int[][] levels) See Sugiyama et al. 1981 (full reference give at top) lindex is the index of the level we want to process. In this method we'll sort the vertices at the level lindex according to their DOWN-barycenters (or row barycenters). -
phaseIID
public void phaseIID(int lindex, int[][] levels) See Sugiyama et al. 1981 (full reference give at top) -
phaseIIU
public void phaseIIU(int lindex, int[][] levels) See Sugiyama et al. 1981 (full reference give at top)
-