Object Neighborhoods
-
- All Implemented Interfaces:
public class Neighborhoods
Contains utility functions for neighborhoods.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Neighborhoods
INSTANCE
-
Method Summary
Modifier and Type Method Description final static <T extends Any, P extends Position<P>> SimpleNeighborhood<T, P>
make(Environment<T, P> environment, Node<T> center, Iterable<Node<T>> neighbors)
Creates a SimpleNeighborhood. final static <T extends Any, P extends Position<P>> SimpleNeighborhood<T, P>
make(Environment<T, P> environment, Node<T> center)
Creates a SimpleNeighborhood. -
-
Method Detail
-
make
@JvmOverloads() final static <T extends Any, P extends Position<P>> SimpleNeighborhood<T, P> make(Environment<T, P> environment, Node<T> center, Iterable<Node<T>> neighbors)
Creates a SimpleNeighborhood.
- Parameters:
environment
- The environment of the neighborhood.center
- The center of the neighborhood.neighbors
- The neighbors in the neighborhood, defaults to empty.- Returns:
The newly created SimpleNeighborhood.
-
make
@JvmOverloads() final static <T extends Any, P extends Position<P>> SimpleNeighborhood<T, P> make(Environment<T, P> environment, Node<T> center)
Creates a SimpleNeighborhood.
- Parameters:
environment
- The environment of the neighborhood.center
- The center of the neighborhood.- Returns:
The newly created SimpleNeighborhood.
-
-
-
-