Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

ptolemy.graph.analysis
Class ZeroLengthCycleAnalysis

java.lang.Object
 extended byptolemy.graph.analysis.Analysis
 extended byptolemy.graph.analysis.ZeroLengthCycleAnalysis

public class ZeroLengthCycleAnalysis
extends Analysis

Analysis to check if a cyclic directed graph has a zero-length cycle. A zero-length cycle is a cycle in which the sum of all the values associated with the edges of the cycle is zero.

Since:
Ptolemy II 4.0
Version:
$Id: ZeroLengthCycleAnalysis.java,v 1.13 2005年07月08日 19:59:02 cxh Exp $
Author:
Shahrooz Shahparnia
Accepted Rating:
Red (ssb)
Proposed Rating:
Red (shahrooz)

Constructor Summary
ZeroLengthCycleAnalysis(Graph graph, ptolemy.graph.mapping.ToDoubleMapping edgeLengths)
Construct an instance of this class using a default analyzer.
ZeroLengthCycleAnalysis(ptolemy.graph.analysis.analyzer.ZeroLengthCycleAnalyzer analyzer)
Construct an instance of this class using a given analyzer.
Method Summary
boolean hasZeroLengthCycle()
Return true if a zero length cycle exists in the graph under analysis.
java.lang.String toString()
Return a description of the analysis and the associated analyzer.
boolean validAnalyzerInterface(ptolemy.graph.analysis.analyzer.Analyzer analyzer)
Check if a given analyzer is compatible with this analysis.
Methods inherited from class ptolemy.graph.analysis.Analysis
analyzer, changeAnalyzer, graph, valid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ZeroLengthCycleAnalysis

public ZeroLengthCycleAnalysis(Graph graph,
 ptolemy.graph.mapping.ToDoubleMapping edgeLengths)
Construct an instance of this class using a default analyzer. The default analyzer runs in O(N^3) in which N is the number of nodes.

Parameters:
graph - The given graph.
edgeLengths - The lengths associated with the edges of the graph.

ZeroLengthCycleAnalysis

public ZeroLengthCycleAnalysis(ptolemy.graph.analysis.analyzer.ZeroLengthCycleAnalyzer analyzer)
Construct an instance of this class using a given analyzer.

Parameters:
analyzer - The given analyzer.
Method Detail

hasZeroLengthCycle

public boolean hasZeroLengthCycle()
Return true if a zero length cycle exists in the graph under analysis.

Returns:
True if the graph has a zero length cycle.

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(ptolemy.graph.analysis.analyzer.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.

Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

AltStyle によって変換されたページ (->オリジナル) /