|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.util.DefaultCausalityInterface
ptolemy.actor.util.BreakCausalityInterface
public class BreakCausalityInterface
This class provides a causality interface where no output port depends on any input port. That is, the dependency of any output port on any input port is the oPlusIdentity() of the specified default dependency.
The equivalentPorts(IOPort)
normally returns list
containing only the specified port. If, however, the actor
has any instance of PortParameter in its input port list, then
it returns a list of all input ports. The reason for this is
that any output, present or future, may depend on the values at
such port parameters. In particular, it is necessary for inputs
on these port parameters to be present when any other input is
processed because it affects the parameters of the actor.
It is more efficient to use this
class than to use the base class and call removeDependency()
to remove all the dependencies.
Dependency
Red (eal) |
Yellow (eal) |
Field Summary |
---|
Fields inherited from class ptolemy.actor.util.DefaultCausalityInterface |
---|
_actor, _backwardPrunedDependencies, _defaultDependency, _delayDependencies, _EMPTY_COLLECTION, _forwardPrunedDependencies |
Constructor Summary | |
---|---|
BreakCausalityInterface(Actor actor,
Dependency defaultDependency)
Construct a causality interface for the specified actor. |
Method Summary | |
---|---|
java.util.Collection<IOPort> |
dependentPorts(IOPort port)
Return a collection of the ports in this actor that depend on or are depended on by the specified port. |
java.util.Collection<IOPort> |
equivalentPorts(IOPort input)
Return a collection of the ports in this actor that are in the same equivalence class. |
Dependency |
getDependency(IOPort input,
IOPort output)
Return the dependency between the specified input port and the specified output port. |
void |
removeDependency(IOPort inputPort,
IOPort outputPort)
Remove the dependency that the specified output port has on the specified input port. |
Methods inherited from class ptolemy.actor.util.DefaultCausalityInterface |
---|
_growDependencies, declareDelayDependency, getActor, getDefaultDependency, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BreakCausalityInterface(Actor actor, Dependency defaultDependency)
actor
- The actor for which this is a causality interface.defaultDependency
- The default dependency of an output
port on an input port.Method Detail |
---|
public java.util.Collection<IOPort> dependentPorts(IOPort port)
Derived classes may override this, but they may need to
also override getDependency(IOPort, IOPort)
and equivalentPorts(IOPort)
to be consistent.
dependentPorts
in interface CausalityInterface
dependentPorts
in class DefaultCausalityInterface
port
- The port to find the dependents of.
public java.util.Collection<IOPort> equivalentPorts(IOPort input)
If derived classes override this, they may also
need to override getDependency(IOPort,IOPort)
and dependentPorts(IOPort)
to be consistent.
The returned result should always include the specified input port.
equivalentPorts
in interface CausalityInterface
equivalentPorts
in class DefaultCausalityInterface
input
- The port to find the equivalence class of.
public Dependency getDependency(IOPort input, IOPort output)
Derived classes should override this method to provide
actor-specific dependency information. If they do so,
then they may also need to override equivalentPorts(IOPort)
and dependentPorts(IOPort)
to be consistent.
getDependency
in interface CausalityInterface
getDependency
in class DefaultCausalityInterface
input
- The specified input port.output
- The specified output port.
public void removeDependency(IOPort inputPort, IOPort outputPort)
removeDependency
in interface CausalityInterface
removeDependency
in class DefaultCausalityInterface
inputPort
- The input port.outputPort
- The output port that does not depend on the
input port.getDependency(IOPort, IOPort)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |