Class SelfLoopAnalysis


  • public class SelfLoopAnalysis
    extends Analysis
    Computation of self-loops in a graph. A self-loop (also called a self-loop edge) in a graph is an edge whose source and sink nodes are identical.

    The returned collection cannot be modified when the client uses the default analyzer.

    Since:
    Ptolemy II 2.0
    Version:
    $Id$
    Author:
    Shahrooz Shahparnia
    Pt.AcceptedRating:
    Red (ssb)
    Pt.ProposedRating:
    Red (shahrooz)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List edges()
      Return the self-loop edges in the graph under analysis.
      java.lang.String toString()
      Return a description of the analysis and the associated analyzer.
      boolean validAnalyzerInterface​(Analyzer analyzer)
      Check if a given analyzer is compatible with this analysis.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SelfLoopAnalysis

        public SelfLoopAnalysis​(Graph graph)
        Construct an instance of this class for a given graph.
        Parameters:
        graph - The given graph.
      • SelfLoopAnalysis

        public SelfLoopAnalysis​(SelfLoopAnalyzer analyzer)
        Construct an instance of this class with a given analyzer.
        Parameters:
        analyzer - The analyzer to use.
    • Method Detail

      • edges

        public java.util.List edges()
        Return the self-loop edges in the graph under analysis. Each element of the list is an Edge.
        Returns:
        Return the self-loop edges.
      • toString

        public java.lang.String toString()
        Return a description of the analysis and the associated analyzer.
        Overrides:
        toString in class Analysis
        Returns:
        A description of the analysis and the associated analyzer.
      • validAnalyzerInterface

        public boolean validAnalyzerInterface​(Analyzer analyzer)
        Check if a given analyzer is compatible with this analysis. In other words if it is possible to use it to compute the computation associated with this analysis.
        Overrides:
        validAnalyzerInterface in class Analysis
        Parameters:
        analyzer - The given analyzer.
        Returns:
        True if the given analyzer is valid for this analysis.