Top Description Fields Constructors Methods
org.apache.commons.math3.genetics

public Class ChromosomePair

extends Object
Class Inheritance

A pair of Chromosome objects.
Since
2.0

Field Summary

Modifier and TypeField and Description
private final Chromosome
first

the first chromosome in the pair.

private final Chromosome
second

the second chromosome in the pair.

Constructor Summary

AccessConstructor and Description
public
ChromosomePair(final Chromosome
the first chromosome.
c1
,
final Chromosome
the second chromosome.
c2
)

Create a chromosome pair.

Method Summary

Modifier and TypeMethod and Description
public Chromosome

Returns:

the first chromosome.
getFirst
()

Access the first chromosome.

public Chromosome

Returns:

the second chromosome.
getSecond
()

Access the second chromosome.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

firstback to summary
private final Chromosome first

the first chromosome in the pair.

secondback to summary
private final Chromosome second

the second chromosome in the pair.

Constructor Detail

ChromosomePairback to summary
public ChromosomePair(final Chromosome c1, final Chromosome c2)

Create a chromosome pair.

Parameters
c1:Chromosome

the first chromosome.

c2:Chromosome

the second chromosome.

Method Detail

getFirstback to summary
public Chromosome getFirst()

Access the first chromosome.

Returns:Chromosome

the first chromosome.

getSecondback to summary
public Chromosome getSecond()

Access the second chromosome.

Returns:Chromosome

the second chromosome.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override