edu.wlu.cs.levy.SNARLI
Class Map2D

java.lang.Object
  |
  +--edu.wlu.cs.levy.SNARLI.Map2D
Direct Known Subclasses:
IGG, SOM

public abstract class Map2D
extends java.lang.Object

Map2D is a general class for two-dimensional maps (SOM, IGG, ...).


Method Summary
 int getColumnDimension()
          Returns the number of columns in this map.
 int getRowDimension()
          Returns the number of rows in this map.
 int[] getUnit(double[] v)
          Returns indices of grid point whose reference vector is closest to a given vector.
 int[][] getUnits()
          Returns indices of grid points from reference vectors.
 double[][][] getWeights()
          Returns current reference vector weights.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWeights

public double[][][] getWeights()
Returns current reference vector weights. Weights are returned as a 2D grid of vectors.

Returns:
reference vector weights

getUnit

public int[] getUnit(double[] v)
Returns indices of grid point whose reference vector is closest to a given vector. Point is returned as a 2D integer array.

Parameters:
v - vector
Returns:
point closest to v
Throws:
java.lang.IllegalArgumentException - if v mismatches dimensionality of IGG

getUnits

public int[][] getUnits()
Returns indices of grid points from reference vectors. Points is returned as an array of 2D integer arrays.

Returns:
grid points corresponding to reference vectors

getRowDimension

public int getRowDimension()
Returns the number of rows in this map.

Returns:
the number of rows in this map

getColumnDimension

public int getColumnDimension()
Returns the number of columns in this map.

Returns:
the number of columns in this map