org.processmining.exporting.petrinet.cpnexport.HLImplementation
Class HLProbabilityDependency

java.lang.Object
  extended by org.processmining.exporting.petrinet.cpnexport.HLImplementation.HLProbabilityDependency
All Implemented Interfaces:
java.lang.Cloneable, HighLevelProbabilityDependency

public class HLProbabilityDependency
extends java.lang.Object
implements HighLevelProbabilityDependency, java.lang.Cloneable

Represents a probability dependency for an alternative branch as it can be determined, e.g., via some frequency analysis.
Not that in the case that there are dependent choices in the process (i.e., non-free-choice constructs) this kind of dependency may result in unexpected results. Therefore, the usage of some explicit frequency model should be considered.

Author:
arozinat
See Also:
HighLevelActivity#addFrequencyDependency, HighLevelActivity#getFrequencyDependencies

Constructor Summary
HLProbabilityDependency()
          Default constructor for HLProbabilityDependency
HLProbabilityDependency(double probability, ModelGraphVertex source, ModelGraphVertex target)
          Constructor with which a probability dependency can be set between two nodes
 
Method Summary
 java.lang.Object clone()
          Makes a shallow copy of this object
 boolean equals(java.lang.Object obj)
          Compares the specified object with this HighLevelProbabilityDependency for equality.
 javax.swing.JPanel getPanel()
          Returns the GUI panel representing this probability dependency.
 double getProbability()
          Retrieves the probability that has been set for this dependency
 ModelGraphVertex getSourceNode()
          Retrieves the source node of the probability dependency that exists between two nodes
 ModelGraphVertex getTargetNode()
          Retrievs the target node of the probability dependency that exists between two nodes
 int hashCode()
          Returns the hascode for a HighLevelProbabilityDependency object.
 void setProbability(double probability)
          Sets the probability for this dependency (between two nodes)
 void setSourceNode(ModelGraphVertex source)
          Sets the source node for the probability dependency that exists between two nodes
 void setTargetNode(ModelGraphVertex target)
          Sets the target node for the probability dependency that exists between two nodes
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HLProbabilityDependency

public HLProbabilityDependency()
Default constructor for HLProbabilityDependency


HLProbabilityDependency

public HLProbabilityDependency(double probability,
                               ModelGraphVertex source,
                               ModelGraphVertex target)
Constructor with which a probability dependency can be set between two nodes

Parameters:
probability - double the probability dependency
source - ModelGraphVertex the source of the alternative branch
target - ModelGraphVertex the target of the alternative branch
Method Detail

setProbability

public void setProbability(double probability)
Description copied from interface: HighLevelProbabilityDependency
Sets the probability for this dependency (between two nodes)

Specified by:
setProbability in interface HighLevelProbabilityDependency
Parameters:
probability - double the probability for this dependency

getProbability

public double getProbability()
Description copied from interface: HighLevelProbabilityDependency
Retrieves the probability that has been set for this dependency

Specified by:
getProbability in interface HighLevelProbabilityDependency
Returns:
double the probability for this dependency

setSourceNode

public void setSourceNode(ModelGraphVertex source)
Description copied from interface: HighLevelProbabilityDependency
Sets the source node for the probability dependency that exists between two nodes

Specified by:
setSourceNode in interface HighLevelProbabilityDependency
Parameters:
source - ModelGraphVertex the source node

getSourceNode

public ModelGraphVertex getSourceNode()
Description copied from interface: HighLevelProbabilityDependency
Retrieves the source node of the probability dependency that exists between two nodes

Specified by:
getSourceNode in interface HighLevelProbabilityDependency
Returns:
ModelGraphVertex the source node

setTargetNode

public void setTargetNode(ModelGraphVertex target)
Description copied from interface: HighLevelProbabilityDependency
Sets the target node for the probability dependency that exists between two nodes

Specified by:
setTargetNode in interface HighLevelProbabilityDependency
Parameters:
target - ModelGraphVertex the target node

getTargetNode

public ModelGraphVertex getTargetNode()
Description copied from interface: HighLevelProbabilityDependency
Retrievs the target node of the probability dependency that exists between two nodes

Specified by:
getTargetNode in interface HighLevelProbabilityDependency
Returns:
ModelGraphVertex the target node

equals

public boolean equals(java.lang.Object obj)
Description copied from interface: HighLevelProbabilityDependency
Compares the specified object with this HighLevelProbabilityDependency for equality. Returns true if the following aspects of the HighLevelProbabilityDependency that are compared are the same:

Specified by:
equals in interface HighLevelProbabilityDependency
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object object to be compared for equality with this HighLevelProbabilityDependency
Returns:
boolean true if the specified object is equal to this HighLevelProbabilityDependency with regard to the source and target node and the probability itself. False otherwise.

hashCode

public int hashCode()
Description copied from interface: HighLevelProbabilityDependency
Returns the hascode for a HighLevelProbabilityDependency object. The hashcode value for a HighLevelProbabilityDependency object is calculated according to the recipe of Josha Bloch in Effective Java (Addison-Wesley 2001). For this recipe, we have to consider the following items:

Specified by:
hashCode in interface HighLevelProbabilityDependency
Overrides:
hashCode in class java.lang.Object
Returns:
int the hashcode value for this highLevelDataDependency

getPanel

public javax.swing.JPanel getPanel()
Returns the GUI panel representing this probability dependency. This way, the probability dependency can be readily displayed and changes to any property are automatically fed back to the internally held values.

Returns:
the GUI panel representing this probability dependency

clone

public java.lang.Object clone()
Makes a shallow copy of this object

Overrides:
clone in class java.lang.Object
Returns:
Object the cloned object