S
- solution typepublic static final class HillClimbing.Builder<S> extends Object
Builder for creating HillClimbing
instances.
Example:
HillClimbing<MyClass> search = Hillclimbing .builder() .validator((s) -> s.isValid()) .heuristic((s) -> s.getScore()) .actionGenerator((s) -> s.getTransformations()) .build();
Modifier and Type | Method and Description |
---|---|
HillClimbing.Builder<S> |
actionGenerator(ActionGenerator<S> actionGenerator) |
HillClimbing<S> |
build()
Build the
HillClimbing instance. |
HillClimbing.Builder<S> |
heuristic(Heuristic<S> heurisitc) |
HillClimbing.Builder<S> |
heuristic(com.google.common.collect.Ordering<? super S> ordering) |
HillClimbing.Builder<S> |
validator(Validator<S> validator) |
public HillClimbing.Builder<S> validator(Validator<S> validator)
public HillClimbing.Builder<S> heuristic(Heuristic<S> heurisitc)
public HillClimbing.Builder<S> heuristic(com.google.common.collect.Ordering<? super S> ordering)
public HillClimbing.Builder<S> actionGenerator(ActionGenerator<S> actionGenerator)
public HillClimbing<S> build()
HillClimbing
instance.Copyright © 2015. All rights reserved.