public class AdaptiveGrid
extends java.lang.Object
| Constructor and Description |
|---|
AdaptiveGrid(int bisections,
int objetives)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSolution(int location)
Increases the number of solutions into a specific hypercube.
|
int |
calculateOccupied()
Calculates the number of hypercubes having one or more solutions.
|
int |
getBisections()
Returns the number of bi-divisions performed in each objective.
|
int |
getLocationDensity(int location)
Returns the number of solutions into a specific hypercube.
|
int |
getMostPopulated()
Returns the value of the most populated hypercube.
|
int |
location(Solution solution)
Calculates the hypercube of a solution.
|
int |
occupiedHypercubes()
Returns the number of hypercubes with more than zero solutions.
|
int |
randomOccupiedHypercube()
Returns a random hypercube that has more than zero solutions.
|
void |
removeSolution(int location)
Decreases the number of solutions into a specific hypercube.
|
int |
rouletteWheel()
Returns a random hypercube using a rouleteWheel method.
|
java.lang.String |
toString()
Retunrns a String representing the grid.
|
void |
updateGrid(SolutionSet solutionSet)
Updates the grid limits and the grid content adding the solutions contained
in a specific
SolutionSet. |
void |
updateGrid(Solution solution,
SolutionSet solutionSet)
Updates the grid limits and the grid content adding a new
Solution. |
public AdaptiveGrid(int bisections,
int objetives)
bisections - Number of bi-divisions of the objective space.objetives - Number of objectives of the problem.public void updateGrid(SolutionSet solutionSet)
SolutionSet.solutionSet - The SolutionSet.public void updateGrid(Solution solution, SolutionSet solutionSet)
Solution.
If the solution falls out of the grid bounds, the limits and content of the
grid must be re-calculated.solution - Solution considered to update the grid.solutionSet - SolutionSet used to update the grid.public int location(Solution solution)
solution - The Solution.public int getMostPopulated()
public int getLocationDensity(int location)
location - Number of the hypercube.public void removeSolution(int location)
location - Number of hypercube.public void addSolution(int location)
location - Number of hypercube.public int getBisections()
public java.lang.String toString()
toString in class java.lang.Objectpublic int rouletteWheel()
public int calculateOccupied()
public int occupiedHypercubes()
public int randomOccupiedHypercube()