org.processmining.analysis.log.scale
Class NumberOfEventsScale

java.lang.Object
  extended by org.processmining.analysis.log.scale.NumberOfEventsScale
All Implemented Interfaces:
ProcessInstanceScale, Plugin

public class NumberOfEventsScale
extends java.lang.Object
implements ProcessInstanceScale

This class weighs a process instance based on the contained number of audit trail entries.

Author:
Christian W. Guenther (christian@deckfour.org)

Field Summary
protected  boolean positivelyCorrelated
           
 
Constructor Summary
NumberOfEventsScale()
          Creates a new scale instance which is negatively correlated, i.e.
NumberOfEventsScale(boolean isPositivelyCorrelated)
          Creates a new scale instance
 
Method Summary
 java.lang.String getHtmlDescription()
          Gets a description of this plugin in HTML.
 java.lang.String getName()
          Gets the name of this plugin.
 double weigh(ProcessInstance anInstance)
          This method assigns a weight on some total scale to a provided process instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

positivelyCorrelated

protected boolean positivelyCorrelated
Constructor Detail

NumberOfEventsScale

public NumberOfEventsScale()
Creates a new scale instance which is negatively correlated, i.e. the weight will decrease with the length of the weighed process instance.


NumberOfEventsScale

public NumberOfEventsScale(boolean isPositivelyCorrelated)
Creates a new scale instance

Parameters:
isPositivelyCorrelated - Whether the scale is positively correlated to the number of events contained. I.e., if this flag is set to true, longer instances will yield a higher weight. If this flag is set to false the weight will decrease with the length of the weighed process instance.
Method Detail

weigh

public double weigh(ProcessInstance anInstance)
Description copied from interface: ProcessInstanceScale
This method assigns a weight on some total scale to a provided process instance. The returned value must always be the same for identical process instances (from the same ProcessInstanceScale implementation).

Specified by:
weigh in interface ProcessInstanceScale
Parameters:
anInstance - The process instance to be weighed
Returns:
Weight assigned to this process instance by the respective scale implementation. This value should always be >= 0.0.

Weights are supposed to be interpreted like "the bigger the better", i.e. a process instance that has a higher "value" of some kind should also yield a respectively high weight.


getName

public java.lang.String getName()
Description copied from interface: Plugin
Gets the name of this plugin. Implementing classes should use this method to return their own name.

Specified by:
getName in interface Plugin
Returns:
the name of this plugin

getHtmlDescription

public java.lang.String getHtmlDescription()
Description copied from interface: Plugin
Gets a description of this plugin in HTML. The string returned by this method should only contain the contents of the body of the html page, so the html, head and body tags should not be used. This HTML page is displayed in the help system or as context sensitive help. The HTML body can be stored in an external file in the /lib/documentation/ sub folder and in this case it can be obtained by calling PluginDocumentationLoader.load(this)

Specified by:
getHtmlDescription in interface Plugin
Returns:
a description of this plugin in HTML