|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.SingletonAttribute
ptolemy.actor.util.FunctionDependency
public abstract class FunctionDependency
This is an abstract base class that describes the dependency that data at an output port has on data at an input port in a firing of the container, which is an entity. In particular, an output port does not depend on an input port if the fire() method of the container produces outputs on the output port or asserts that no outputs will be produced on the output port in this iteration without knowing anything about the input port (what data are there, or even whether there are data). The container is specified by the constructor argument and cannot be changed once this object is constructed.
This class uses a graph to describe the function dependency, where the nodes of the graph correspond to the ports and an edge indicates a function dependency. The edges go from input ports to output ports that depend on them.
The dependency graph by default indicates complete dependency,
which means that each output port depends on all input ports.
This default dependency graph is constructed in the protected
method _constructDependencyGraph(), which can be
overridden in subclasses to construct a more accurate
dependency graph. See FunctionDependencyOfAtomicActor
and FunctionDependencyOfCompositeActor for example
concrete subclasses. The composite actor version analyzes
the contained model to determine from the function dependencies
of the contained actors and from the connections what the
function dependencies of the composite actor are.
| Green (eal) |
| Green (hyzheng) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Field Summary | |
|---|---|
protected DirectedGraph |
_dependencyGraph
The dependency graph of the associated actor. |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
|---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
|---|---|
FunctionDependency(Entity container)
Construct a FunctionDependency object for the given actor. |
|
| Method Summary | |
|---|---|
protected DirectedGraph |
_constructConnectedDependencyGraph()
Construct a complete dependency graph with all the ports of the associated actor as nodes and edges going from each input port node to each output port node. |
protected void |
_constructDependencyGraph()
Construct the dependency graph for the associated actor. |
protected DirectedGraph |
_constructDisconnectedDependencyGraph()
Construct and return a dependency graph containing all the ports of the associated actor as nodes and no edges. |
protected void |
_validate()
Update the FunctionDependency object. |
DirectedGraph |
getDependencyGraph()
Return the dependency graph representing the function dependency of an actor. |
java.util.Set |
getDependentOutputPorts(IOPort inputPort)
Get the output ports that depend on the given input port. |
java.util.List |
getInputPortsDependentOn(IOPort outputPort)
Get the input ports on which the given output port is dependent. |
void |
setContainer(NamedObj container)
Add this attribute to the given container. |
| Methods inherited from class ptolemy.kernel.util.Attribute |
|---|
_getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected DirectedGraph _dependencyGraph
| Constructor Detail |
|---|
public FunctionDependency(Entity container)
throws IllegalActionException,
NameDuplicationException
container - The container.
IllegalActionException - If the name has a period in it, or
the attribute is not compatible with the specified container.
NameDuplicationException - If the container already has an
attribute with this name, and the class of that container is not
SingletonAttribute.| Method Detail |
|---|
public DirectedGraph getDependencyGraph()
public java.util.Set getDependentOutputPorts(IOPort inputPort)
inputPort - The given input port.
public java.util.List getInputPortsDependentOn(IOPort outputPort)
outputPort - The given output port.
public void setContainer(NamedObj container)
throws IllegalActionException,
NameDuplicationException
setContainer in class SingletonAttributecontainer - The container to attach this attribute to.
IllegalActionException - If this attribute is not of the
expected class for the container, or it has no name,
or the attribute and container are not in the same workspace, or
the proposed container would result in recursive containment.
NameDuplicationException - If the container already has
an attribute with the name of this attribute that is of class
SingletonConfigurableAttribute.Attribute.getContainer()protected final DirectedGraph _constructConnectedDependencyGraph()
protected void _constructDependencyGraph()
IllegalActionException - Not thrown in this class.protected final DirectedGraph _constructDisconnectedDependencyGraph()
protected final void _validate()
Workspace.getVersion()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||