|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlio.neighbourhood.permutation.permNeighbourGenerator
public class permNeighbourGenerator
This class allows generating neighbours from a permutation by swaping each position with other.
| Constructor Summary | |
|---|---|
permNeighbourGenerator()
|
|
| Method Summary | |
|---|---|
Individual[] |
getAllNeighbours(Individual individual)
Returns the neighbours of one individual ordered decreasingly. |
Individual[] |
getBestNeighbours(Individual individual,
int numNeighbours)
Returns the best neighbours of one individual ordered decreasingly. |
LiOResourceDefinition |
getDefinition()
Return a LiOResDescription object with the information of the object. |
Individual |
getRandomNeighbour(Individual individual)
Returns a random neighbour of one individual. |
boolean |
isNonContiguous()
Getter for property nonContiguous. |
static void |
main(java.lang.String[] args)
Allows testing the class. |
void |
setNonContiguous(boolean nonContiguous)
Setter for property nonContiguous. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public permNeighbourGenerator()
| Method Detail |
|---|
public Individual[] getBestNeighbours(Individual individual,
int numNeighbours)
getBestNeighbours in interface Neighbourhoodindividual - Individual whose neighbourhood is being returned.numNeighbours - Number of individuals returned.
public Individual getRandomNeighbour(Individual individual)
getRandomNeighbour in interface Neighbourhoodindividual - Individual whose neighbour is being returned.
public LiOResourceDefinition getDefinition()
getDefinition in interface LiOResourcepublic boolean isNonContiguous()
public void setNonContiguous(boolean nonContiguous)
nonContiguous - New value of property nonContiguous.public static void main(java.lang.String[] args)
args - the command line argumentspublic Individual[] getAllNeighbours(Individual individual)
getAllNeighbours in interface Neighbourhoodindividual - Individual whose neighbourhood is being returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||