Class SourceNodeAnalysis


  • public class SourceNodeAnalysis
    extends Analysis
    Computation of source nodes in a graph. A source node in a graph is a node without input edges.

    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)
    • Constructor Detail

      • SourceNodeAnalysis

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

        public SourceNodeAnalysis​(SourceNodeAnalyzer analyzer)
        Construct an instance of this class using a given analyzer.
        Parameters:
        analyzer - The given analyzer.
    • Method Detail

      • nodes

        public java.util.List nodes()
        Return the source nodes in the graph under analysis. Each element of the collection is an Node.
        Returns:
        Return the source nodes.
      • 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.