Class Chromosome

java.lang.Object
  |
  +--Partition
        |
        +--Chromosome

public class Chromosome
extends Partition

Chromosome


Field Summary
static int CROSS_AM_X_2RAND_CLASS
           
static int CROSS_AM_X_BEST_CLASS
           
static int CROSS_AM_X_BEST_WORST
           
static int CROSS_RAND
           
static int CROSS_X_2RAND_CLASS
           
protected  int crossoverType
           
static int DISTRIB_NONE
           
static int DISTRIB_RAND
           
static int DISTRIB_TO_EVEN
           
protected  int distributionType
           
static int MUT_MOVE_ELEM
           
static int MUT_RAND
           
static int MUT_SWAP_ELEM
           
protected  int mutationType
           
 
Fields inherited from class Partition
CF_DIV, CF_POW, CF_PROD, CF_SYM_DIFF, cfIsValid, classCard, classCode, classFitness, classFitnessType, fitness, maxNoClasses, size, v
 
Method Summary
static void computeFitnessValue(Chromosome chrom1, java.util.Hashtable[] intersectMap, Partition[] db, int N, Chromosome chrom2, int entropyMeasure, int fitnessMeasure, double[] weightDBTarget, double[] weightTargetDB, double[] weight)
          compute fitness value of chromosome chrom2 based on the fitness value of chromosome chrom1 and on the intersection between chrom1 and the collection of N partitions in db
static void computeFitnessValues(Chromosome[] c1, int N1, Partition[] c2, int N2, int entropyMeasure, int fitnessMeasure, double[] weightDBTarget, double[] weightTargetDB, double[] weight)
          computes the fitness of the chromosome and the fitness of the classes for chromosomes in the collection c1 relative to the partitions in the collection c2; N1 is the size of the collection c1; N2 represents the number of partitions in c2
static void computeFitnessValues(Chromosome chrom1, java.util.Hashtable[] intersectMap, Partition[] db, int N, Chromosome[] c1, int N1, int entropyMeasure, int fitnessMeasure, double[] weightDBTarget, double[] weightTargetDB, double[] weight)
          computes fitness value of chromosomes in collection c1 based on the fitness value of chromosome chrom1 and on the intersection between chrom1 and the collection of N partitions in db
 void crossover(Chromosome c, java.util.Random rand)
          performs the crossover between this chromosome and the one received as argument according to crossoverType
 int getCrossoverType()
           
 int getDistributionType()
           
 int getMutationType()
           
static void main(java.lang.String[] args)
           
 void mutate(java.util.Random rand)
          performes the mutation according to mutation type
 
Methods inherited from class Partition
adjust, computeFitness, computeFitness, computeInfoIntersections, computeIntersections, computeIntersections, computeSilhouettes, distSymDiff, entropy, entropyIntersect, estimateWeights, get, getAM, getClassCard, getClassCode, getClassesAndCardinalities, getClassFitness, getClassFitnessType, getClassifRate, getClassIntersections, getFitness, getMaxNoClasses, getNoClasses, getSize, hasClassCode, init, isEqual, plotSilhouettes, plotSilhouettes, print, print, printAM, printClassCardinalities, printClassCardinalities, printClassFitness, printClassInfo, printInfo, printInfo, printIntersections, set, set, setAM, setClassCode, setClassFitness, setFitness, setSize, sumDistSymDiff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

crossoverType

protected int crossoverType

mutationType

protected int mutationType

distributionType

protected int distributionType

CROSS_RAND

public static final int CROSS_RAND
See Also:
Constant Field Values

CROSS_X_2RAND_CLASS

public static final int CROSS_X_2RAND_CLASS
See Also:
Constant Field Values

CROSS_AM_X_BEST_CLASS

public static final int CROSS_AM_X_BEST_CLASS
See Also:
Constant Field Values

CROSS_AM_X_BEST_WORST

public static final int CROSS_AM_X_BEST_WORST
See Also:
Constant Field Values

CROSS_AM_X_2RAND_CLASS

public static final int CROSS_AM_X_2RAND_CLASS
See Also:
Constant Field Values

MUT_RAND

public static final int MUT_RAND
See Also:
Constant Field Values

MUT_MOVE_ELEM

public static final int MUT_MOVE_ELEM
See Also:
Constant Field Values

MUT_SWAP_ELEM

public static final int MUT_SWAP_ELEM
See Also:
Constant Field Values

DISTRIB_NONE

public static final int DISTRIB_NONE
See Also:
Constant Field Values

DISTRIB_RAND

public static final int DISTRIB_RAND
See Also:
Constant Field Values

DISTRIB_TO_EVEN

public static final int DISTRIB_TO_EVEN
See Also:
Constant Field Values
Method Detail

getCrossoverType

public int getCrossoverType()
Returns:
the crossover type

getMutationType

public int getMutationType()
Returns:
the mutation type

getDistributionType

public int getDistributionType()
Returns:
the distribution type

computeFitnessValues

public static void computeFitnessValues(Chromosome[] c1,
                                        int N1,
                                        Partition[] c2,
                                        int N2,
                                        int entropyMeasure,
                                        int fitnessMeasure,
                                        double[] weightDBTarget,
                                        double[] weightTargetDB,
                                        double[] weight)
computes the fitness of the chromosome and the fitness of the classes for chromosomes in the collection c1 relative to the partitions in the collection c2; N1 is the size of the collection c1; N2 represents the number of partitions in c2


computeFitnessValues

public static void computeFitnessValues(Chromosome chrom1,
                                        java.util.Hashtable[] intersectMap,
                                        Partition[] db,
                                        int N,
                                        Chromosome[] c1,
                                        int N1,
                                        int entropyMeasure,
                                        int fitnessMeasure,
                                        double[] weightDBTarget,
                                        double[] weightTargetDB,
                                        double[] weight)
computes fitness value of chromosomes in collection c1 based on the fitness value of chromosome chrom1 and on the intersection between chrom1 and the collection of N partitions in db


computeFitnessValue

public static void computeFitnessValue(Chromosome chrom1,
                                       java.util.Hashtable[] intersectMap,
                                       Partition[] db,
                                       int N,
                                       Chromosome chrom2,
                                       int entropyMeasure,
                                       int fitnessMeasure,
                                       double[] weightDBTarget,
                                       double[] weightTargetDB,
                                       double[] weight)
compute fitness value of chromosome chrom2 based on the fitness value of chromosome chrom1 and on the intersection between chrom1 and the collection of N partitions in db


crossover

public void crossover(Chromosome c,
                      java.util.Random rand)
performs the crossover between this chromosome and the one received as argument according to crossoverType


mutate

public void mutate(java.util.Random rand)
performes the mutation according to mutation type


main

public static void main(java.lang.String[] args)