Class ChromosomePair
- java.lang.Object
-
- org.apache.commons.math3.genetics.ChromosomePair
-
public class ChromosomePair extends java.lang.Object
A pair ofChromosome
objects.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private Chromosome
first
the first chromosome in the pair.private Chromosome
second
the second chromosome in the pair.
-
Constructor Summary
Constructors Constructor Description ChromosomePair(Chromosome c1, Chromosome c2)
Create a chromosome pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Chromosome
getFirst()
Access the first chromosome.Chromosome
getSecond()
Access the second chromosome.java.lang.String
toString()
-
-
-
Field Detail
-
first
private final Chromosome first
the first chromosome in the pair.
-
second
private final Chromosome second
the second chromosome in the pair.
-
-
Constructor Detail
-
ChromosomePair
public ChromosomePair(Chromosome c1, Chromosome c2)
Create a chromosome pair.- Parameters:
c1
- the first chromosome.c2
- the second chromosome.
-
-
Method Detail
-
getFirst
public Chromosome getFirst()
Access the first chromosome.- Returns:
- the first chromosome.
-
getSecond
public Chromosome getSecond()
Access the second chromosome.- Returns:
- the second chromosome.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-