public class UnifiedDistanceMatrix extends java.lang.Object implements MapVisualization
| Modifier and Type | Field and Description |
|---|---|
private DistanceMeasure |
distance
Distance.
|
private boolean |
individualDistances
Whether to show distance between each pair of neighbouring units.
|
| Constructor and Description |
|---|
UnifiedDistanceMatrix(boolean individualDistances,
DistanceMeasure distance)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private double[][] |
averageDistances(NeuronSquareMesh2D map)
Computes the distances between a unit of the map and its neighbours.
|
double[][] |
computeImage(NeuronSquareMesh2D map)
Creates an image of the
map. |
private double[][] |
individualDistances(NeuronSquareMesh2D map)
Computes the distances between a unit of the map and its
neighbours.
|
private final boolean individualDistances
private final DistanceMeasure distance
public UnifiedDistanceMatrix(boolean individualDistances,
DistanceMeasure distance)
individualDistances - If true, the 8 individual
inter-units distances will be computed. They will be stored in additional pixels around each of
the original units of the 2D-map. The additional pixels that lie
along a "diagonal" are shared by two pairs of units: their
value will be set to the average distance between the units belonging
to each of the pairs. The value zero will be stored in the pixel
corresponding to the location of a unit of the 2D-map.
false, only the average distance between a unit and all its
neighbours will be computed (and stored in the pixel corresponding to
that unit of the 2D-map). In that case, the number of neighbours taken
into account depends on the network's
neighbourhood type.distance - Distance.public double[][] computeImage(NeuronSquareMesh2D map)
map.computeImage in interface MapVisualizationmap - Map.private double[][] individualDistances(NeuronSquareMesh2D map)
map because each neuron has 8 neighbours.
The value zero will be stored in the pixels corresponding to
the location of a map unit.map - Map.private double[][] averageDistances(NeuronSquareMesh2D map)
map - Map.Copyright (c) 2003-2017 Apache Software Foundation