public class BinaryFamilyRepresentation extends BinaryRepresentation
| Constructor and Description |
|---|
BinaryFamilyRepresentation(java.util.BitSet x,
int size)
Constructor.
|
BinaryFamilyRepresentation(boolean[] x)
Constructor.
|
BinaryFamilyRepresentation(int size)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Representation<java.util.BitSet> |
duplicate()
Duplicates the representation.
|
boolean |
equals(java.lang.Object obj) |
void |
generate()
Generates a random new instance of the problem.
|
java.util.BitSet |
getFather()
Returns the father vector.
|
java.util.BitSet |
getMother()
Returns the mother vector.
|
int |
hashCode() |
void |
setFather(java.util.BitSet father)
Sets the father vector.
|
void |
setMother(java.util.BitSet mother)
Sets the mother vector.
|
java.lang.String |
toString() |
getSize, getSolution, setSolutionpublic BinaryFamilyRepresentation(int size)
size - the size of the Binary representationpublic BinaryFamilyRepresentation(java.util.BitSet x,
int size)
x - the solution vectorsize - the size of the Binary representationpublic BinaryFamilyRepresentation(boolean[] x)
x - the solution vectorpublic java.lang.String toString()
toString in class BinaryRepresentationpublic void generate()
generate in class BinaryRepresentationpublic java.util.BitSet getFather()
public void setFather(java.util.BitSet father)
father - the father vector to set.public java.util.BitSet getMother()
public void setMother(java.util.BitSet mother)
mother - the mother vector to set.public Representation<java.util.BitSet> duplicate()
Representationduplicate in class BinaryRepresentationpublic boolean equals(java.lang.Object obj)
equals in class BinaryRepresentationpublic int hashCode()
hashCode in class BinaryRepresentation