org.processmining.mining.dmcscanning
Class Footprint

java.lang.Object
  extended by org.processmining.mining.dmcscanning.Footprint

public class Footprint
extends java.lang.Object

This class wraps a footprint, i.e. an unordered set of data objects that are typically modified in a clustered way.

Author:
Christian W. Guenther (christian at deckfour dot org)

Field Summary
protected  java.util.HashSet<java.lang.String> dataObjects
           
 
Constructor Summary
Footprint()
          constructor
Footprint(Footprint other)
          copy constructor
 
Method Summary
 void add(java.lang.String data)
          add a new data object to this footprint, keeps the set minimal (no double entries)
 java.lang.Object clone()
          returns a deep copy of this footprint instance
 boolean contains(java.lang.String data)
          checks, whether a data object is already contained
 void convertToCanonical(ObjectEquivalence equiv)
          Converts all contained data object identifiers to canonical representations of the data objects, following the rules implemented in the given equivalence relation implementation.
 boolean equals(java.lang.Object obj)
          tests for deep equality with another footprint instance
 java.util.HashSet<java.lang.String> getData()
           
 Footprint intersection(Footprint other)
          Set-wise intersection.
 boolean isSubsetOf(Footprint other)
          Checks whether this footprint is a subset of another footprint, i.e.
 java.util.Iterator iterator()
           
 double overlap(Footprint other)
          Computes the relative overlap of this footprint with another one, i.e.
 void remove(java.lang.String data)
          removes a data object from this footprint
 int size()
           
 java.lang.Object[] toArray()
           
 java.lang.String toString()
          String representation
 Footprint union(Footprint other)
          Set-wise union.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataObjects

protected java.util.HashSet<java.lang.String> dataObjects
Constructor Detail

Footprint

public Footprint()
constructor


Footprint

public Footprint(Footprint other)
copy constructor

Parameters:
other -
Method Detail

clone

public java.lang.Object clone()
returns a deep copy of this footprint instance

Overrides:
clone in class java.lang.Object

add

public void add(java.lang.String data)
add a new data object to this footprint, keeps the set minimal (no double entries)

Parameters:
data -

remove

public void remove(java.lang.String data)
removes a data object from this footprint

Parameters:
data -

size

public int size()
Returns:
the number of data objects contained

contains

public boolean contains(java.lang.String data)
checks, whether a data object is already contained

Parameters:
data -
Returns:

iterator

public java.util.Iterator iterator()
Returns:
Iterator on the contained data object identifier strings

getData

public java.util.HashSet<java.lang.String> getData()
Returns:
the contained data objects as strings

toArray

public java.lang.Object[] toArray()
Returns:
contained data objects as array of strings

equals

public boolean equals(java.lang.Object obj)
tests for deep equality with another footprint instance

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:

intersection

public Footprint intersection(Footprint other)
Set-wise intersection. Both this and other footprint remain unchanged.

Parameters:
other - further footprint
Returns:
the intersection of this footprint with another one

union

public Footprint union(Footprint other)
Set-wise union. Both this and other footprint remain unchanged.

Parameters:
other - further footprint
Returns:
the union of this footprint with another one

overlap

public double overlap(Footprint other)
Computes the relative overlap of this footprint with another one, i.e. if the intersection of this and another footprint contains exactly half of each footprint's elements, the overlap will be 0.5. Identical footprints will yield an overlap of 1.0, those whose intersection is empty will yield an overlap of 0.0.

Parameters:
other - further footprint
Returns:
relative overlap, percentage within [0,1]

isSubsetOf

public boolean isSubsetOf(Footprint other)
Checks whether this footprint is a subset of another footprint, i.e. all its data objects are also contained within the other footprint

Parameters:
other -
Returns:

convertToCanonical

public void convertToCanonical(ObjectEquivalence equiv)
Converts all contained data object identifiers to canonical representations of the data objects, following the rules implemented in the given equivalence relation implementation.

Parameters:
equiv - equivalence relation implementation used for conversion

toString

public java.lang.String toString()
String representation

Overrides:
toString in class java.lang.Object