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$
    Author:
    Shahrooz Shahparnia
    See Also:
    MirrorTransformation
    Pt.AcceptedRating:
    Red (ssb)
    Pt.ProposedRating:
    Red (shahrooz)
    • 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.