Class LocationFinder
- java.lang.Object
-
- org.apache.commons.math4.neuralnet.twod.util.LocationFinder
-
public class LocationFinder extends Object
Helper class to find the grid coordinates of a neuron.- Since:
- 3.6
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLocationFinder.LocationContainer holding a (row, column) pair.
-
Constructor Summary
Constructors Constructor Description LocationFinder(NeuronSquareMesh2D map)Builds a finder to retrieve the locations of neurons that belong to the givenmap.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocationFinder.LocationgetLocation(Neuron n)Retrieves a neuron's grid coordinates.
-
-
-
Constructor Detail
-
LocationFinder
public LocationFinder(NeuronSquareMesh2D map)
Builds a finder to retrieve the locations of neurons that belong to the givenmap.- Parameters:
map- Map.- Throws:
IllegalStateException- if the network contains non-unique identifiers. This indicates an inconsistent state due to a bug in the construction code of the underlyingnetwork.
-
-
Method Detail
-
getLocation
public LocationFinder.Location getLocation(Neuron n)
Retrieves a neuron's grid coordinates.- Parameters:
n- Neuron.- Returns:
- the (row, column) coordinates of
n, ornullif no such neuron belongs to themap used to build this instance.
-
-