com.rubecula.darwin.examples.travelingsalesman
Class Allele_Number

java.lang.Object
  extended by net.sf.tostring0.AToString
      extended by com.rubecula.darwin.domain.helper.Attribute_
          extended by com.rubecula.darwin.domain.genetics.Allele_
              extended by com.rubecula.darwin.examples.travelingsalesman.Allele_Number
All Implemented Interfaces:
Allele, Attribute, Basic, CacheSignature, Censusible, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString

public class Allele_Number
extends Allele_

This class is at the heart of the solution to the traveling salesman problem. An Allele_Number immediately follows an Allele

Author:
Robin Hillyard

Field Summary
static java.lang.String BACKWARD
          backward
static java.lang.String FORWARD
          forward
static java.lang.String NEXT
          next
static java.lang.String STAY
          stay
 
Fields inherited from class com.rubecula.darwin.domain.genetics.Allele_
LOG
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Constructor Summary
Allele_Number(java.lang.Object key, java.lang.Object value)
           
 
Method Summary
 java.lang.String getBases()
           
 int getIntegerValue()
           
static Allele makeNumberAllele(java.lang.String type, int value)
           
 
Methods inherited from class com.rubecula.darwin.domain.genetics.Allele_
censusMe, getCensusibleChildren, getLocus, getSignature, getStringChars, setLocus, setStringChars, setValue, toString
 
Methods inherited from class com.rubecula.darwin.domain.helper.Attribute_
equals, getAttribute, getIdentifier, getValue, hashCode
 
Methods inherited from class net.sf.tostring0.AToString
toString, toStringBrief, toStringId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Attribute
getAttribute, getValue
 
Methods inherited from interface net.sf.tostring0.IToString
toStringBrief, toStringId
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 

Field Detail

FORWARD

public static final java.lang.String FORWARD
forward

See Also:
Constant Field Values

BACKWARD

public static final java.lang.String BACKWARD
backward

See Also:
Constant Field Values

NEXT

public static final java.lang.String NEXT
next

See Also:
Constant Field Values

STAY

public static final java.lang.String STAY
stay

See Also:
Constant Field Values
Constructor Detail

Allele_Number

public Allele_Number(java.lang.Object key,
                     java.lang.Object value)
Parameters:
key -
value -
Method Detail

makeNumberAllele

public static Allele makeNumberAllele(java.lang.String type,
                                      int value)
Parameters:
type -
value -
Returns:
the newly constructed Allele

getBases

public java.lang.String getBases()
Returns:
C for stay, G for next, A for backward, T for forward.
See Also:
Basic.getBases()

getIntegerValue

public int getIntegerValue()
Returns:
the value of this allele, as an int


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.