프로퍼티 | 타입 | 설명 | |
---|---|---|---|
length | int | ||
rand | ThreadSafeRandom | ||
val | ulong |
메소드 | 설명 | |
---|---|---|
BinaryChromosome ( int length ) : System |
Initializes a new instance of the BinaryChromosome class.
|
|
Clone ( ) : IChromosome |
Clone the chromosome. The method clones the chromosome returning the exact copy of it. |
|
CreateNew ( ) : IChromosome |
Create new random chromosome with same parameters (factory method). The method creates new chromosome of the same type, but randomly initialized. The method is useful as factory method for those classes, which work with chromosome's interface, but not with particular chromosome type. |
|
Crossover ( IChromosome pair ) : void |
Crossover operator. The method performs crossover between two chromosomes – interchanging range of bits between these chromosomes. |
|
Generate ( ) : void |
Generate random chromosome value. Regenerates chromosome's value using random number generator. |
|
Mutate ( ) : void |
Mutation operator. The method performs chromosome's mutation, changing randomly one of its bits. |
|
ToString ( ) : string |
Get string representation of the chromosome.
|
메소드 | 설명 | |
---|---|---|
BinaryChromosome ( |
Initializes a new instance of the BinaryChromosome class. This is a copy constructor, which creates the exact copy of specified chromosome. |
protected BinaryChromosome ( |
||
source | Source chromosome to copy. | |
리턴 | System |
public BinaryChromosome ( int length ) : System | ||
length | int | Chromosome's length in bits, [2, |
리턴 | System |
public Crossover ( IChromosome pair ) : void | ||
pair | IChromosome | Pair chromosome to crossover with. |
리턴 | void |