Class Neighbourhood
- java.lang.Object
-
- ch.idsia.crema.inference.approxlp1.Neighbourhood
-
- All Implemented Interfaces:
NeighbourhoodFunction<Move,Solution>
public class Neighbourhood extends Object implements NeighbourhoodFunction<Move,Solution>
-
-
Constructor Summary
Constructors Constructor Description Neighbourhood(GraphicalModel<? extends GenericFactor> model, int... locked)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Solutionmove(Solution from, Move doing)Perform the specified move for the `from` solution.List<Move>neighbours(Solution solution)Provide the caller with the possible moves available when in the specified Solution.Solutionrandom()Generate a random solution.
-
-
-
Constructor Detail
-
Neighbourhood
public Neighbourhood(GraphicalModel<? extends GenericFactor> model, int... locked)
-
-
Method Detail
-
neighbours
public List<Move> neighbours(Solution solution)
Description copied from interface:NeighbourhoodFunctionProvide the caller with the possible moves available when in the specified Solution.- Specified by:
neighboursin interfaceNeighbourhoodFunction<Move,Solution>- Returns:
- A list of moves
-
random
public Solution random()
Description copied from interface:NeighbourhoodFunctionGenerate a random solution. This can be used for generating a starting point for some algorithms.- Specified by:
randomin interfaceNeighbourhoodFunction<Move,Solution>- Returns:
-
move
public Solution move(Solution from, Move doing)
Description copied from interface:NeighbourhoodFunctionPerform the specified move for the `from` solution. The resulting solution is returned- Specified by:
movein interfaceNeighbourhoodFunction<Move,Solution>- Returns:
-
-