|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.MiToBo.io.files.GraphvizWriter<T>
T
- Type of the nodes' data objects@ALDMetaInfo(export=ALLOWED) @ALDAOperator(genericExecutionMode=NONE, level=STANDARD) public class GraphvizWriter<T extends Comparable<?> & Comparator<?>>
Write graph to file using the DOT-language for visualization using graphviz tools.
A main graph has to be specified whether as MTBGraph
or AdjacencyMatrix
.
Further, subgraphs can be specified which then are painted in the specified color.
If T is of type MatchingAdjacencyMatrix.NodeID
, the nodes of each partition are
drawn with same rank, i.e. they are lined up horizontally.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
protected AdjacencyMatrix<T> |
adjmatrix
|
protected String[] |
dotGlobalAttributes
|
protected String |
filename
|
protected MTBGraph |
graph
|
protected double |
maxWeight
|
protected Vector<MTBGraph> |
subgraphs
|
protected Vector<AdjacencyMatrix<T>> |
subgraphs_adj
|
protected Vector<Color> |
subgraphs_adj_color
|
protected Vector<Color> |
subgraphs_color
|
protected boolean |
weightAsEdgeThickness
|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
GraphvizWriter()
Empty constructor |
|
GraphvizWriter(AdjacencyMatrix<T> adjmatrix,
String filename)
Constructor for specifying the graph by an adjacency matrix |
|
GraphvizWriter(MTBGraph graph,
String filename)
Constructor for specifying the graph by MTBGraph |
Method Summary | |
---|---|
void |
addSubgraph(MTBGraph subgraph,
Color c)
Specify a subgraph that is to be painted in the given color. |
void |
addSubgraphAdjaceny(AdjacencyMatrix<T> subgraph_adj,
Color c)
Specify a subgraph that is to be painted in the given color. |
protected void |
operate()
|
void |
setAdjacencyMatrix(AdjacencyMatrix<T> adjmatrix)
Set the main graph's adjacency matrix |
void |
setDotGlobalAttributes(String[] dotGlobalAttributes)
Set global attributes of the graph e.g. the style of the nodes etc. |
void |
setFilename(String filename)
Set the filename for output |
void |
setGraph(MTBGraph graph)
Set the main graph using MTBGraph |
void |
setMaxWeight(double maxWeight)
Specify the maximum weight in the graph. |
void |
setWeightAsEdgeThickness(boolean weightAsEdgeThickness)
Set flag how edge weights are visualized. |
void |
validateCustom()
|
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
addOperatorExecutionProgressEventListener, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, isConfigured, print, print, print, printInterface, printInterface, readHistory, readResolve, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, runOp, runOp, runOp, setConstructionMode, setHidingMode, setName, setParameter, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Parameter(label="adjmatrix", direction=IN, required=false, description="Adjacency matrix of the input graph") protected AdjacencyMatrix<T extends Comparable<?> & Comparator<?>> adjmatrix
@Parameter(label="graph", direction=IN, required=false, description="Input graph") protected MTBGraph graph
@Parameter(label="filename", direction=IN, required=true, description="Output file name") protected String filename
@Parameter(label="weightAsEdgeThickness", direction=IN, required=true, description="Visualize weights by edge thickness") protected boolean weightAsEdgeThickness
@Parameter(label="dotGlobalAttributes", direction=IN, required=false, description="Global attributes for graph drawing (dot commands), e.g. node/edge style, color etc.") protected String[] dotGlobalAttributes
@Parameter(label="maxWeight", direction=IN, required=false, description="Maximum weight/cost in the graph, needed to limit edge thickness to 10pts if weights are visualized by edge thickness.") protected double maxWeight
protected Vector<MTBGraph> subgraphs
protected Vector<Color> subgraphs_color
protected Vector<AdjacencyMatrix<T extends Comparable<?> & Comparator<?>>> subgraphs_adj
protected Vector<Color> subgraphs_adj_color
Constructor Detail |
---|
public GraphvizWriter() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public GraphvizWriter(AdjacencyMatrix<T> adjmatrix, String filename) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public GraphvizWriter(MTBGraph graph, String filename) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
MTBGraph
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public void setAdjacencyMatrix(AdjacencyMatrix<T> adjmatrix)
public void setGraph(MTBGraph graph)
MTBGraph
public void setFilename(String filename)
public void setWeightAsEdgeThickness(boolean weightAsEdgeThickness)
public void setDotGlobalAttributes(String[] dotGlobalAttributes)
public void setMaxWeight(double maxWeight)
public void addSubgraph(MTBGraph subgraph, Color c)
public void addSubgraphAdjaceny(AdjacencyMatrix<T> subgraph_adj, Color c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |