Package org.apache.commons.math3.ml.neuralnet.twod.util

# Class LocationFinder

java.lang.Object
org.apache.commons.math3.ml.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 class`
`LocationFinder.Location`
Container 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 given `map`.

## Method Summary

Modifier and Type
Method
Description
`LocationFinder.Location`
`getLocation(Neuron n)`
Retrieves a neuron's grid coordinates.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LocationFinder

public LocationFinder(NeuronSquareMesh2D map)
Builds a finder to retrieve the locations of neurons that belong to the given `map`.

Parameters:
  `map` - Map.
Throws:
  `MathIllegalStateException` - if the network contains non-unique identifiers. This indicates an inconsistent state due to a bug in the construction code of the underlying `network`.

## Method Details

### getLocation

public LocationFinder.Location getLocation(Neuron n)
Retrieves a neuron's grid coordinates.

Parameters:
  `n` - Neuron.
Returns:
  the (row, column) coordinates of `n`, or `null` if no such neuron belongs to the `map used to build this instance`.