|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.util.SuperdenseDependency
public class SuperdenseDependency
This dependency represents causal relationships that have a real value and a superdense time index. If the real value is infinite, this represents the lack of a causal relationship. A finite positive real value represents a causal dependency with (typically) a time delay. A zero value represents no time delay, but whether there is an immediate causal relationship depends on the index. If the index is 0, then there is an immediate causal relationship. Otherwise, there is not. See the paper "Causality Interfaces for Actor Networks" by Ye Zhou and Edward A. Lee, ACM Transactions on Embedded Computing Systems (TECS), April 2008, as available as Technical Report No. UCB/EECS-2006-148, November 16, 2006.
Red (eal) |
Yellow (eal) |
Field Summary | |
---|---|
private int |
_index
The superdense time index. |
private double |
_time
The real (time) value. |
static SuperdenseDependency |
OPLUS_IDENTITY
The additive identity. |
static SuperdenseDependency |
OTIMES_IDENTITY
The multiplicative identity. |
Fields inherited from interface ptolemy.actor.util.Dependency |
---|
EQUALS, GREATER_THAN, INCOMPARABLE, LESS_THAN |
Constructor Summary | |
---|---|
private |
SuperdenseDependency(double time,
int index)
Construct a dependency with the specified value. |
Method Summary | |
---|---|
int |
compareTo(Dependency dependency)
Return Dependency.LESS_THAN, EQUALS, or GREATER_THAN depending on whether the argument is less than, equal to, or greater than this dependency. |
boolean |
equals(java.lang.Object object)
Return true if the value of this dependency equals that of the specified one, and the specified one is an instance of RealDepedency. |
int |
hashCode()
Return the same hashCode that that Java Double object would return had it the same value as the real part of the value of this dependency. |
int |
indexValue()
Return the index value of this dependency. |
Dependency |
oPlus(Dependency dependency)
Return a dependency that results from parallel composition of this one and the specified one. |
Dependency |
oPlusIdentity()
Return the dependency that when added to any other dependency using oPlus() yields the other dependency. |
Dependency |
oTimes(Dependency dependency)
Return a dependency that results from serial composition of this one and the specified one. |
Dependency |
oTimesIdentity()
Return the dependency that when multiplied by any other dependency using oTimes() yields the other dependency. |
double |
timeValue()
Return the time value of this dependency. |
java.lang.String |
toString()
Return a string representation in the form "SuperdenseDependency(_time, _index)". |
static SuperdenseDependency |
valueOf(double time,
int index)
Return an instance of SuperdenseDependency with the specified time and index value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SuperdenseDependency OPLUS_IDENTITY
public static final SuperdenseDependency OTIMES_IDENTITY
private int _index
private double _time
Constructor Detail |
---|
private SuperdenseDependency(double time, int index)
time
- The real part of the dependency.index
- The supersense index part of the dependency.Method Detail |
---|
public int compareTo(Dependency dependency)
In the case where both dependencies have _time value equal to Double.POSITIVE_INFINITY, these two dependencies are equal, even though its indices may differ. This conforms with valueOf() method
compareTo
in interface java.lang.Comparable<Dependency>
dependency
- The dependency to compare against.
java.lang.ClassCastException
- If the argument is not an instance
of SuperdenseDependency.valueOf(double, int).
public boolean equals(java.lang.Object object)
In the case where both dependencies have _time value equal to Double.POSITIVE_INFINITY, these two dependencies are equal, even though its indices may differ. This conforms with valueOf() method
equals
in class java.lang.Object
object
- The object to compare against.
valueOf(double, int).
public int hashCode()
hashCode
in class java.lang.Object
public int indexValue()
public Dependency oPlus(Dependency dependency)
oPlus
in interface Dependency
dependency
- The dependency to add.
java.lang.ClassCastException
- if dependency is not a SuperdenseDependency.public Dependency oPlusIdentity()
oPlusIdentity
in interface Dependency
public Dependency oTimes(Dependency dependency)
oTimes
in interface Dependency
dependency
- The dependency to multiply.
java.lang.ClassCastException
- if dependency is not a RealDependency.public Dependency oTimesIdentity()
oTimesIdentity
in interface Dependency
public double timeValue()
public java.lang.String toString()
toString
in class java.lang.Object
public static SuperdenseDependency valueOf(double time, int index)
time
- The time value.index
- The index value.
OTIMES_IDENTITY
is returned, if
value is (Double.POSITIVE_INFINITY, n) for any n,
then OPLUS_IDENTITY
is returned. Otherwise the SuperdenseDependency constructor
is called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |