|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--SimSegmenter
Class SimSegmenter embodies the segmentation algorithm. Its constructor accepts a host of parameters that control both how the SimSegmenter itself runs but also how it should use the SimFinder.
Field Summary | |
double |
crossover
Parameter for the SimFinder. |
java.lang.String |
file
Name of the midi or MuseData file that 'mother' is constructed from. |
double |
freshBloodChance
Parameter for the SimFinder. |
int |
generationsAfterLimitReached
How many generations a SimSegmenter should keep searching for similarities using a given SimilarityMeasure even though it finds an acceptable similarity. |
int |
gensPerLimitCheck
How many generations the SimSegmenter should run the SimFinder between checks for SimilarityStatements that have come under the limit, i.e. for acceptable matches. |
double |
groupBase
Parameter for the SimFinder (groupBaseGamma). |
int |
initSize
Parameter for the SimFinder (called initSubSize in the SimFinder). |
double |
limit
The limit value that SimilarityStatements must come below to be acceptable. |
int |
maxSize
Parameter for the SimFinder (maxSubsize). |
SimilarityMeasure[] |
measures
The set of similarity measures ranked from specific to general. |
MotherGraph |
mother
The MotherGraph being segmented by this SimSegmenter. |
double |
mutation
Parameter for the SimFinder. |
java.util.Vector |
nonterm
A Vector of Nonterminal s already created. |
int |
nonTerminalNumber
The current nonterminal number. |
int |
occGens
How many generations a SimSegmenter should search for occurrences using a given SimilarityMeasure before giving up. |
int |
popSize
Parameter for the SimFinder (populationSize) |
java.util.Vector |
prodRules
A Vector of all GraphProductionRule s already
created. |
int |
repFreq
Parameter for the SimFinder (reportFrequency) |
SimFinder |
sf
The current SimFinder used by this SimSegmenter. |
int |
simGens
How many generations a SimSegmenter should search for similarities using a given SimilarityMeasure before giving up. |
SimilarityMeasure |
theMeasure
The current similarity measure used for searching. |
Constructor Summary | |
SimSegmenter(java.lang.String filename,
boolean interpartEdges,
boolean combineTies,
boolean combineRests,
SimilarityMeasure[] meas,
double cross,
double mut,
int initsz,
int popsz,
int repfq,
java.lang.String outfile,
int simgen,
int occgen,
double lim,
int maxsiz,
double freshblood,
int gensAfterLimitReached,
int gensLimitCheck,
double gamma)
|
Method Summary | |
static void |
main(java.lang.String[] args)
Starts the SimSegmenter: Usage: java SimSegmenter |
void |
run()
Runs the Simsegmenting algorithm. |
void |
show()
Shows the population in the last generation. |
void |
showAllProductionRules(java.util.Vector pr)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public SimFinder sf
public MotherGraph mother
public double crossover
public double mutation
public int initSize
public int popSize
public int repFreq
public int maxSize
public double freshBloodChance
public double groupBase
public java.lang.String file
public int simGens
public int occGens
public int generationsAfterLimitReached
public int gensPerLimitCheck
public double limit
public SimilarityMeasure theMeasure
public SimilarityMeasure[] measures
public int nonTerminalNumber
public java.util.Vector nonterm
Nonterminal
s already created.
public java.util.Vector prodRules
GraphProductionRule
s already
created.
Constructor Detail |
public SimSegmenter(java.lang.String filename, boolean interpartEdges, boolean combineTies, boolean combineRests, SimilarityMeasure[] meas, double cross, double mut, int initsz, int popsz, int repfq, java.lang.String outfile, int simgen, int occgen, double lim, int maxsiz, double freshblood, int gensAfterLimitReached, int gensLimitCheck, double gamma) throws java.lang.Exception
filename
- The input file.interpartEdges
- Whether the graph should be partwise
(interpartEdges = false) or not (interpartEdges = true).combineTies
- Make only one note (vertice) in stead of
two tied.combineRests
- Make one (longer) rest (vertice) in
stead of two (shorter).meas
- the array of SimilarityMeasure
s. The
order of the measures determines the order in which the
search takes place.cross
- the crossover parameter used in the GA.initsz
- the initial size for the subgraphs used in the GA.popsz
- the population size used in the GA.repfq
- report frequency used in the GA.outfile
- the output file used in the GA.simgen
- the number of generations used in the GA to
find best matching graphs.occgen
- the number of generations used to find an
occurrence of an already found Subgraph
.lim
- the threshold. SimilarityStatement
s with
a fitness below this limit are accepted (ant their
subgraphs substituted with a compound).maxsiz
- it is possoble to specify a maximal size for
the subgraphs used in the GA.freshblood
- used in the GA.gensAfterLimitReached
- runs this number of
generations even though the mest found aslready is below
the limit (threshold lim) specified.gensLimitCheck
- run this number of generations before
checking if the limit is reached.gamma
- the grouping structire value
java.lang.Exception
- if the SimFinder is not able to be constructed.Method Detail |
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public void run()
public void show()
public void showAllProductionRules(java.util.Vector pr)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |