|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.util.RealDependency
public class RealDependency
This dependency represents causal relationships that have a real value or are infinite. Infinity 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 an immediate causal relationship. 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 double |
_value
The value. |
static RealDependency |
OPLUS_IDENTITY
The additive identity. |
static RealDependency |
OTIMES_IDENTITY
The multiplicative identity. |
Fields inherited from interface ptolemy.actor.util.Dependency |
---|
EQUALS, GREATER_THAN, INCOMPARABLE, LESS_THAN |
Constructor Summary | |
---|---|
private |
RealDependency(double value)
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. |
Dependency |
oPlus(Dependency d)
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 d)
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. |
java.lang.String |
toString()
Return a string representation in the form "RealDependency(value)". |
double |
value()
Return the double value of the dependency. |
static RealDependency |
valueOf(double value)
Return an instance of RealDependency with the specified value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final RealDependency OPLUS_IDENTITY
public static final RealDependency OTIMES_IDENTITY
private double _value
Constructor Detail |
---|
private RealDependency(double value)
value
- The value.Method Detail |
---|
public int compareTo(Dependency dependency)
compareTo
in interface java.lang.Comparable<Dependency>
dependency
- The dependency to compare against.
java.lang.ClassCastException
- If the argument is not an instance
of RealDependency.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- The object to compare against.
public int hashCode()
hashCode
in class java.lang.Object
public Dependency oPlus(Dependency d)
oPlus
in interface Dependency
d
- The dependency to add.
java.lang.ClassCastException
- if d is not a RealDependency.public Dependency oPlusIdentity()
oPlusIdentity
in interface Dependency
public Dependency oTimes(Dependency d)
oTimes
in interface Dependency
d
- The dependency to multiply.
java.lang.ClassCastException
- if d is not a RealDependency.public Dependency oTimesIdentity()
oTimesIdentity
in interface Dependency
public java.lang.String toString()
toString
in class java.lang.Object
public double value()
public static RealDependency valueOf(double value)
value
- The value used to determine the RealDependency
to be returned.
OTIMES_IDENTITY
is returned, if
value is Double.POSITIVE_INFINITY, then OPLUS_IDENTITY
is returned. Otherwise the RealDependency constructor
is called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |