|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.graph.analysis.Analysis
ptolemy.graph.analysis.MirrorTransformation
public class MirrorTransformation
A mirror transformations on graphs. Creates a mirror of this graph in the form of the type of the associated graph. The mirror and original graphs are isomorphic(of same topology). However, node and edge objects of the mirror are newly created and therefore not "equal" to those of the original graph.
To relate nodes and edges from the original and the mirrored graph
the transformedVersionOf(java.lang.Object)
and originalVersionOf(java.lang.Object)
methods are
provided.
Labels can also be used to relate mirror and original
nodes(edges).
In the cloneWeight(boolean)
method, users can also specify whether
to clone node and edge weights. For non cloneable weights a CloneNotSupportedException
will be thrown by the virtual
machine.
Red (ssb) |
Red (shahrooz) |
Constructor Summary | |
---|---|
MirrorTransformation(Graph graph)
Construct a transformation for a given graph with a default analyzer. |
|
MirrorTransformation(MirrorTransformer analyzer)
Construct a transformation for a given graph and a given analyzer. |
Method Summary | |
---|---|
void |
cloneWeight(boolean status)
Changes the status of the graph returned by the mirror() method. |
boolean |
hasBackwardMapping()
Specify if this transformation has a mapping from the transformed version to the original version or not. |
boolean |
hasForwardMapping()
Specify if this transformation has a mapping from the original version to the transformed version or not. |
Graph |
mirror()
Create a mirror of the graph associated with this analyzer with the same runtime class. |
Graph |
mirror(Graph graph,
boolean cloneWeights)
Return a mirror of this graph in the form of the argument graph type (i.e., the run-time type of the returned graph is that of the argument graph). |
java.lang.Object |
originalVersionOf(java.lang.Object transformedObject)
Return the original version of given object in the transformed graph. |
java.lang.String |
toString()
Return a description of the analysis and the associated analyzer. |
java.lang.Object |
transformedVersionOf(java.lang.Object originalObject)
Return the transformed version of a given object in the original graph. |
boolean |
validAnalyzerInterface(Analyzer analyzer)
Check if a given analyzer is compatible with this analysis. |
Methods inherited from class ptolemy.graph.analysis.Analysis |
---|
analyzer, changeAnalyzer, graph, valid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MirrorTransformation(Graph graph)
graph
- The given graph.public MirrorTransformation(MirrorTransformer analyzer)
analyzer
- The default Analyzer.Method Detail |
---|
public void cloneWeight(boolean status)
mirror()
method.
If true, the weights will also be cloned in the next calls to the
mirror()
method.
status
- If true, the weights will also be cloned.public boolean hasBackwardMapping()
public boolean hasForwardMapping()
public Graph mirror()
public Graph mirror(Graph graph, boolean cloneWeights)
In this method, users can also specify whether to clone node and edge weights.
graph
- The graph.cloneWeights
- True if the weights will also be cloned.
public java.lang.Object originalVersionOf(java.lang.Object transformedObject)
transformedObject
- The given object in the transformed graph.
public java.lang.String toString()
toString
in class Analysis
public java.lang.Object transformedVersionOf(java.lang.Object originalObject)
originalObject
- The given object in the original graph.
public boolean validAnalyzerInterface(Analyzer analyzer)
validAnalyzerInterface
in class Analysis
analyzer
- The given analyzer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |