ptolemy.graph.analysis.analyzer
Interface MirrorTransformer

All Superinterfaces:
Analyzer, GraphAnalyzer, Transformer
All Known Implementing Classes:
MirrorTransformerStrategy

public interface MirrorTransformer
extends Transformer

Base interface for a mirror transformer for graphs.

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.

Since:
Ptolemy II 4.0
Version:
$Id: MirrorTransformer.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Shahrooz Shahparnia
See Also:
MirrorTransformation
Accepted Rating:
Red (ssb)
Proposed Rating:
Red (shahrooz)

Method Summary
 void cloneWeight(boolean status)
          Changes the status of the graph returned by the mirror() method.
 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).
 
Methods inherited from interface ptolemy.graph.analysis.analyzer.Transformer
hasBackwardMapping, hasForwardMapping, originalVersionOf, transformedVersionOf
 
Methods inherited from interface ptolemy.graph.analysis.analyzer.GraphAnalyzer
graph
 
Methods inherited from interface ptolemy.graph.analysis.analyzer.Analyzer
toString, valid
 

Method Detail

cloneWeight

void cloneWeight(boolean status)
Changes the status of the graph returned by the mirror() method. If set to true, the weights will also be cloned in the next calls to the mirror() method.

Parameters:
status - If set to true, the weights will also be cloned.

mirror

Graph mirror()
Create a mirror of the graph associated with this analyzer with the same runtime class.

Returns:
The resulting mirror graph.

mirror

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).

Parameters:
graph - The type of the graph which the graph associated with this analyzer is being mirrored to.
cloneWeights - If set true, the weights will also be cloned.
Returns:
The resulting mirror graph.