public class TreeImpl extends AbstractGraph<TreeNode,TreeEdge> implements Tree
Modifier and Type | Field and Description |
---|---|
static TreeNode[] |
leafs
The tree pendant to OMDDNode.TERMINALS
|
static TreeNode |
MINUS_ONE_NODE |
static int |
MODE_DIAGRAM |
static int |
MODE_DIAGRAM_WITH_MULTIPLE_LEAFS |
static int |
MODE_TREE |
TreeNode |
root |
attributes, graphAnnotation, graphName, ZIP_PREFIX
Constructor and Description |
---|
TreeImpl(TreeBuilder parser)
Create a new Tree and link it to the parser.
|
Modifier and Type | Method and Description |
---|---|
TreeEdge |
addEdge(TreeNode source,
TreeNode target,
int value)
add an edge between source and target
|
boolean |
containsNode(TreeNode node)
Indicates if the tree contains a node
|
protected List<?> |
doMerge(Graph<TreeNode,TreeEdge> graph)
Specialized method that execute the merging of the given graph with the current one
Must be override at specialized graph level
|
int |
getMode() |
int |
getNodeOrderSize()
Return the size of the node order
|
TreeBuilder |
getParser() |
Graph<TreeNode,TreeEdge> |
getSubgraph(Collection<TreeNode> vertex,
Collection<TreeEdge> edges)
Specialized method that build the sub-graph corresponding to the given lists of vertices and edges
The returned graph contains clones of the given graph objects structured as they are in the current graph
|
void |
setMode(int treeMode) |
void |
setRoot(TreeNode root)
Define the root (a TreeNode) of the tree
|
addEdge, addNode, addViewListener, containsEdge, copyView, damage, doSave, fireGraphChange, fireMetaChange, getAnnotation, getAttributes, getCachedEdgeAttributeReader, getCachedNodeAttributeReader, getDimension, getDisplayName, getEdge, getEdgeAttributeReader, getEdges, getExistingNode, getGINMLWriter, getGraphName, getGraphZipName, getIncomingEdges, getNodeAttributeReader, getNodeByName, getNodeCount, getNodes, getOutgoingEdges, getShortestPath, getStronglyConnectedComponents, getStyleManager, isEmpty, merge, refresh, removeEdge, removeNode, repaint, save, save, searchNodes, setAttribute, setGraphName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addViewListener, copyView, fireGraphChange, getAttributes, getDimension, getDisplayName, getEdgeAttributeReader, getNodeAttributeReader, getStyleManager, save, save, setAttribute
addEdge, addNode, containsEdge, getAnnotation, getEdge, getEdges, getExistingNode, getGraphName, getIncomingEdges, getNodeByName, getNodeCount, getNodes, getOutgoingEdges, getShortestPath, getStronglyConnectedComponents, merge, removeEdge, removeNode, searchNodes, setGraphName
public static final int MODE_DIAGRAM_WITH_MULTIPLE_LEAFS
public static final int MODE_DIAGRAM
public static final int MODE_TREE
public static final TreeNode MINUS_ONE_NODE
public static TreeNode[] leafs
public TreeNode root
public TreeImpl(TreeBuilder parser)
parser
- the parser that will fill the tree.public boolean containsNode(TreeNode node)
containsNode
in interface GraphModel<TreeNode,TreeEdge>
containsNode
in interface Tree
containsNode
in class AbstractGraph<TreeNode,TreeEdge>
node
- public TreeEdge addEdge(TreeNode source, TreeNode target, int value)
public void setRoot(TreeNode root)
Tree
public TreeBuilder getParser()
public int getNodeOrderSize()
getNodeOrderSize
in interface GraphModel<TreeNode,TreeEdge>
getNodeOrderSize
in class AbstractGraph<TreeNode,TreeEdge>
protected List<?> doMerge(Graph<TreeNode,TreeEdge> graph)
AbstractGraph
doMerge
in class AbstractGraph<TreeNode,TreeEdge>
public Graph<TreeNode,TreeEdge> getSubgraph(Collection<TreeNode> vertex, Collection<TreeEdge> edges)
AbstractGraph
getSubgraph
in interface GraphModel<TreeNode,TreeEdge>
getSubgraph
in class AbstractGraph<TreeNode,TreeEdge>
vertex
- the list of node to include in the desired sub-graphedges
- the list of edges to include in the sub-graphCopyright © 2005–2020. All rights reserved.