Package ptolemy.graph.analysis
Class SinkNodeAnalysis
- java.lang.Object
-
- ptolemy.graph.analysis.Analysis
-
- ptolemy.graph.analysis.SinkNodeAnalysis
-
public class SinkNodeAnalysis extends Analysis
Computation of sink nodes in a graph. A sink node in a graph is a node without output edges.The returned collection cannot be modified when the client uses the default strategy.
- Since:
- Ptolemy II 2.0
- Version:
- $Id$
- Author:
- Shahrooz Shahparnia
- Pt.AcceptedRating:
- Red (ssb)
- Pt.ProposedRating:
- Red (shahrooz)
-
-
Constructor Summary
Constructors Constructor Description SinkNodeAnalysis(SinkNodeAnalyzer analyzer)
Construct an instance of this class using a given analyzer.SinkNodeAnalysis(Graph graph)
Construct an instance of this class for a given graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List
nodes()
Return the sink nodes 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 ptolemy.graph.analysis.Analysis
analyzer, changeAnalyzer, graph, valid
-
-
-
-
Constructor Detail
-
SinkNodeAnalysis
public SinkNodeAnalysis(Graph graph)
Construct an instance of this class for a given graph.- Parameters:
graph
- The given graph.
-
SinkNodeAnalysis
public SinkNodeAnalysis(SinkNodeAnalyzer 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 sink nodes in the graph under analysis. Each element of the list is anNode
.- Returns:
- Return the sink nodes.
-
toString
public java.lang.String toString()
Return 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 classAnalysis
- Parameters:
analyzer
- The given analyzer.- Returns:
- True if the given analyzer is valid for this analysis.
-
-