类 DotParser
java.lang.Object
weka.gui.graphvisualizer.DotParser
- 所有已实现的接口:
GraphConstants
This class parses input in DOT format, and
builds the datastructures that are passed to it.
It is NOT 100% compatible with the DOT format. The
GraphNode and GraphEdge classes do not have any provision
for dealing with different colours or shapes of nodes,
there can however, be a different label and ID for a
node. It also does not do anything for labels for
edges. However, this class won't crash or throw an
exception if it encounters any of the above
attributes of an edge or a node. This class however,
won't be able to deal with things like subgraphs and
grouping of nodes.
- 版本:
- $Revision: 7059 $ - 23 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
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明parse()
This method parses the string or the InputStream that we passed in through the constructor and builds up the m_nodes and m_edges vectorsstatic void
writeDOT
(String filename, String graphName, FastVector nodes, FastVector edges) This method saves a graph in a file in DOT format.
-
构造器详细资料
-
DotParser
Dot parser Constructor- 参数:
input
- - The input, if passing in a string then encapsulate that in String reader objectnodes
- - Vector to put in GraphNode objects, corresponding to the nodes parsed in from the inputedges
- - Vector to put in GraphEdge objects, corresponding to the edges parsed in from the input
-
-
方法详细资料
-
parse
This method parses the string or the InputStream that we passed in through the constructor and builds up the m_nodes and m_edges vectors- 返回:
- - returns the name of the graph
-
writeDOT
This method saves a graph in a file in DOT format. However, if reloaded in GraphVisualizer we would need to layout the graph again.- 参数:
filename
- - The name of the file to write in. (will overwrite)graphName
- - The name of the graphnodes
- - Vector containing all the nodesedges
- - Vector containing all the edges
-