|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmapss.dif.DIFEdgeWeight
mapss.dif.bdf.BDFEdgeWeight
public class BDFEdgeWeight
Information associated with an BDF edge.
BDFEdgeWeights are objects associated with Edge
s
that represent BDF edges in Graph
s.
This class caches frequently-used data associated with BDF edges.
The BDF edge production and consumption rate can have two types. One is regular edge rate, which is represented in positive int or Integer. The other one is boolean edge rate, which is represented as [true rate, false rate] in int[].
Edge
Constructor Summary | |
---|---|
BDFEdgeWeight()
Construct an edge weight for a regular, homogeneous, zero-delay edge. |
|
BDFEdgeWeight(java.lang.Object productionRate,
java.lang.Object consumptionRate,
int delay)
Construct an edge weight for a specified token production rate, token consumption rate, and delay. |
|
BDFEdgeWeight(java.lang.Object sourcePort,
java.lang.Object sinkPort,
java.lang.Object productionRate,
java.lang.Object consumptionRate,
int delay)
Construct an edge weight for a specified source port, sink port, token production rate, token consumption rate, and delay. |
Method Summary | |
---|---|
java.lang.Object |
getBDFConsumptionRate()
Get the token consumption rate of the associated BDF edge. |
java.lang.Object |
getBDFProductionRate()
Get the token production rate of the associated BDF edge. |
int |
getIntDelay()
Get the delay of the associated BDF edge. |
void |
setBDFConsumptionRate(int consumptionRate)
Set the token consumption rate of a regular BDF edge. |
void |
setBDFConsumptionRate(int[] consumptionRate)
Set the token consumption rate of a boolean BDF edge. |
void |
setBDFProductionRate(int productionRate)
Set the token production rate of a regular BDF edge. |
void |
setBDFProductionRate(int[] productionRate)
Set the token production rate of a boolean BDF edge. |
void |
setConsumptionRate(java.lang.Object consumptionRate)
Override DIFEdgeWeight.setConsumptionRate(Object)
to check the type of input object, and call
setBDFConsumptionRate(int[]) to set the boolean consumption
rate or setBDFConsumptionRate(int) to set the regular
consumption rate. |
void |
setDelay(int delay)
Set delay of a BDF edge. |
void |
setProductionRate(java.lang.Object productionRate)
Override DIFEdgeWeight.setProductionRate(Object)
to check the type of input object, and call
setBDFProductionRate(int[]) to set the boolean consumption
rate or setBDFProductionRate(int) to set the regular
consumption rate. |
java.lang.String |
toString()
Return a string representation of the edge weight. |
Methods inherited from class mapss.dif.DIFEdgeWeight |
---|
_getConsumptionRate, _getDelay, _getProductionRate, _setConsumptionRate, _setDelay, _setProductionRate, clone, getConsumptionRate, getDelay, getProductionRate, getSinkPort, getSourcePort, setDelay, setSinkPort, setSourcePort |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BDFEdgeWeight()
public BDFEdgeWeight(java.lang.Object productionRate, java.lang.Object consumptionRate, int delay)
productionRate
- The token production rate.consumptionRate
- The token consumption rate.delay
- The delay.public BDFEdgeWeight(java.lang.Object sourcePort, java.lang.Object sinkPort, java.lang.Object productionRate, java.lang.Object consumptionRate, int delay)
sourcePort
- The source port.sinkPort
- The sink port.productionRate
- The token production rate.consumptionRate
- The token consumption rate.delay
- The delay.Method Detail |
---|
public java.lang.Object getBDFConsumptionRate()
public java.lang.Object getBDFProductionRate()
public int getIntDelay()
public void setBDFConsumptionRate(int consumptionRate)
consumptionRate
- The token consumption rate in
int
mocgraph.GraphWeightException
- If the consumptionRate is not
positive.public void setBDFConsumptionRate(int[] consumptionRate)
consumptionRate
- The token consumption rate in
int[]
.
mocgraph.GraphWeightException
- If the length of consumptionRate is
not 2.public void setBDFProductionRate(int productionRate)
productionRate
- The token production rate in
int
.
mocgraph.GraphWeightException
- If the productionRate is not
positive.public void setBDFProductionRate(int[] productionRate)
productionRate
- The token production rate in
int[]
.
mocgraph.GraphWeightException
- If the length of productionRate is
not 2.public void setConsumptionRate(java.lang.Object consumptionRate)
DIFEdgeWeight.setConsumptionRate(Object)
to check the type of input object, and call
setBDFConsumptionRate(int[])
to set the boolean consumption
rate or setBDFConsumptionRate(int)
to set the regular
consumption rate.
setConsumptionRate
in class DIFEdgeWeight
consumptionRate
- The token consumption rate.
mocgraph.GraphWeightException
- If the input object is not instanceof
int[] or positive Integer.public void setDelay(int delay)
delay
- The delay in int
.public void setProductionRate(java.lang.Object productionRate)
DIFEdgeWeight.setProductionRate(Object)
to check the type of input object, and call
setBDFProductionRate(int[])
to set the boolean consumption
rate or setBDFProductionRate(int)
to set the regular
consumption rate.
setProductionRate
in class DIFEdgeWeight
productionRate
- The token production rate.
mocgraph.GraphWeightException
- If the input object is not instanceof
int[] or positive Integer.public java.lang.String toString()
productionRate consumptionRate delay
toString
in class DIFEdgeWeight
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |