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 and Description
    --- | ---
    `static class` | `LocationFinder.Location` Container holding a (row, column) pair.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocationFinder(NeuronSquareMesh2D map)` Builds a finder to retrieve the locations of neurons that belong to the given `map`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 Detail

    - #### 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 Detail

    - #### 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`.

Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.