org.processmining.mining.geneticmining.util
Class MethodsOverIndividuals

java.lang.Object
  extended by org.processmining.mining.geneticmining.util.MethodsOverIndividuals

public class MethodsOverIndividuals
extends java.lang.Object

Version:
1.0
Author:
Ana Karla A. de Medeiros

Constructor Summary
MethodsOverIndividuals()
           
 
Method Summary
static HNSet buildHNSet(double startOrEndEntry, cern.colt.matrix.DoubleMatrix1D inOrOutRowOrColumn, java.util.Random generator)
          Build a HNSet that will be the INPUT or OUTPUT set of an individual's workflow model element.
static HNSet buildSet(double startOrEndEntry, cern.colt.matrix.DoubleMatrix1D inOrOutRowOrColumn, java.util.Random generator)
          Build a HNSet that will be the INPUT or OUTPUT set of an individual's workflow model element.
static void decreasinglyOrderPopulation(HeuristicsNet[] population)
           
static HeuristicsNet[] extractBestIndividuals(HeuristicsNet[] population)
          This method assumes that the population is INCREASINGLY order by the fitness measure.
static cern.colt.matrix.DoubleMatrix1D randomlyAddEntry(cern.colt.matrix.DoubleMatrix1D matrix, java.util.Random generator)
           
static cern.colt.matrix.DoubleMatrix1D randomlyRemoveEntry(cern.colt.matrix.DoubleMatrix1D matrix, java.util.Random generator)
           
static HeuristicsNet removeDanglingElementReferences(HeuristicsNet individual)
          This methods matches the INPUT and OUTPUT sets of the individual.
static HeuristicsNet[] removeDuplicates(HeuristicsNet[] population)
           
static java.util.HashSet removeElementFromSubsets(java.util.HashSet set, java.lang.Integer element)
           
static HeuristicsNet[] removeUnusedElements(HeuristicsNet[] localPopulation, Fitness fitness)
          Removes the unfired tasks and unused arcs of every individual in the population.
static java.lang.Integer selectAnElementInSubset(java.util.TreeSet subset, java.util.Random generator)
          This method randomly selects and returns an element in subsets
static java.util.TreeSet selectSubset(java.util.HashSet sets, java.util.Random generator)
          This method randomly selects and returns an element in sets
static HeuristicsNet updateRelatedElements(HeuristicsNet ind, int element, java.util.Random r)
          Updates the net according to the INPUT and OUTPUT sets of "element".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodsOverIndividuals

public MethodsOverIndividuals()
Method Detail

removeUnusedElements

public static HeuristicsNet[] removeUnusedElements(HeuristicsNet[] localPopulation,
                                                   Fitness fitness)
Removes the unfired tasks and unused arcs of every individual in the population.

Parameters:
localPopulation - DuplicateTasksHeuristicsNet[] population to be cleaned.
fitness - Fitness fitness to be used to recompute the individual's fitness after the cleaning.
Returns:
DuplicateTasksHeuristicsNet[] cleaned population with the updated fitness values.

updateRelatedElements

public static HeuristicsNet updateRelatedElements(HeuristicsNet ind,
                                                  int element,
                                                  java.util.Random r)
Updates the net according to the INPUT and OUTPUT sets of "element".

Parameters:
ind - individual to update.
element - has the INPUT/OUTPUT sets that are going to guide the update of the other related elements.
r - random generator.
Returns:
an updated individual.

removeDuplicates

public static HeuristicsNet[] removeDuplicates(HeuristicsNet[] population)

removeDanglingElementReferences

public static HeuristicsNet removeDanglingElementReferences(HeuristicsNet individual)
This methods matches the INPUT and OUTPUT sets of the individual.

Parameters:
individual - to check and correct if necessary
Returns:
individual without dangling element references

decreasinglyOrderPopulation

public static void decreasinglyOrderPopulation(HeuristicsNet[] population)

buildSet

public static HNSet buildSet(double startOrEndEntry,
                             cern.colt.matrix.DoubleMatrix1D inOrOutRowOrColumn,
                             java.util.Random generator)
Build a HNSet that will be the INPUT or OUTPUT set of an individual's workflow model element. The INPUT/OUTPUT sets are general because their subsets do not need to be a partition set of the set of tasks in the log.

Parameters:
startOrEndEntry -
inOrOutRowOrColumn -
generator - random generator.
Returns:

buildHNSet

public static HNSet buildHNSet(double startOrEndEntry,
                               cern.colt.matrix.DoubleMatrix1D inOrOutRowOrColumn,
                               java.util.Random generator)
Build a HNSet that will be the INPUT or OUTPUT set of an individual's workflow model element. The INPUT/OUTPUT sets are general because their subsets do not need to be a partition set of the set of tasks in the log.

Parameters:
startOrEndEntry -
inOrOutRowOrColumn -
generator - random generator.
Returns:

randomlyAddEntry

public static cern.colt.matrix.DoubleMatrix1D randomlyAddEntry(cern.colt.matrix.DoubleMatrix1D matrix,
                                                               java.util.Random generator)

randomlyRemoveEntry

public static cern.colt.matrix.DoubleMatrix1D randomlyRemoveEntry(cern.colt.matrix.DoubleMatrix1D matrix,
                                                                  java.util.Random generator)

selectAnElementInSubset

public static java.lang.Integer selectAnElementInSubset(java.util.TreeSet subset,
                                                        java.util.Random generator)
This method randomly selects and returns an element in subsets

Returns:
a randomly selected Integer in subsets. If "subsets" is empty, this method returns null;

selectSubset

public static java.util.TreeSet selectSubset(java.util.HashSet sets,
                                             java.util.Random generator)
This method randomly selects and returns an element in sets

Returns:
a randomly selected subset in sets. If "sets" is empty, this method returns null;

removeElementFromSubsets

public static java.util.HashSet removeElementFromSubsets(java.util.HashSet set,
                                                         java.lang.Integer element)

extractBestIndividuals

public static HeuristicsNet[] extractBestIndividuals(HeuristicsNet[] population)
This method assumes that the population is INCREASINGLY order by the fitness measure.

Returns:
all the individuals that have a fitness X, where X is the best fitness in this. This method returns null if the population is empty or null. populations.