|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdatabionics.esom.grid.Grid
databionics.esom.grid.MatrixGrid
databionics.esom.grid.RectangularGrid
public abstract class RectangularGrid
Abstract base class for all grid structures with a rectangular shaped grid.
| Field Summary | |
|---|---|
protected int |
columns
columns of rectangle |
protected static org.apache.log4j.Logger |
log
interface to log4j system |
protected int |
rows
rows of rectangle |
| Fields inherited from class databionics.esom.grid.MatrixGrid |
|---|
weights |
| Fields inherited from class databionics.esom.grid.Grid |
|---|
dim, distanceFunction, distanceFunctionName, size |
| Constructor Summary | |
|---|---|
RectangularGrid()
Standard constructor |
|
RectangularGrid(int rows,
int cols,
int dim)
Constructor with sizes |
|
| Method Summary | |
|---|---|
int |
coordinates2index(int row,
int col)
Convert row/column coordinates on grid to unique index |
static int |
coordinates2index(int row,
int col,
int columns)
Convert row/column coordinates on grid to unique index |
int |
getColumns()
Get number of columns |
cern.colt.matrix.DoubleMatrix1D |
getNeuron(int row,
int col)
Access to a weight vector by coordinates |
int |
getRows()
Get number of rows |
WtsFile |
getWts()
Convert grid to wts file |
abstract int |
gridDistance(int row1,
int col1,
int row2,
int col2)
Distance of two neurons on the grid |
int |
index2col(int index)
Convert unique index on grid to column coordinate |
static int |
index2col(int index,
int columns)
Convert unique index on grid to column coordinate |
int |
index2row(int index)
Convert unique index on grid to row coordinate |
static int |
index2row(int index,
int columns)
Convert unique index on grid to row coordinate |
void |
init(java.lang.String method,
Descriptives desc,
cern.jet.random.engine.RandomEngine random)
Initialize the dimensions of the weights by pca |
static RectangularGrid |
loadWeights(java.lang.String filename)
Load the weight vectors from a *.wts file |
static int |
manhattanGridDistance(int row1,
int col1,
int row2,
int col2)
Manhattan distance on rectangular grids. |
static int |
maximumGridDistance(int row1,
int col1,
int row2,
int col2)
Maximum distance on rectangular grids. |
boolean |
saveWeights(java.lang.String filename)
Save the weight vectors to a *.wts file |
boolean |
saveWeights(java.lang.String filename,
StringList comment)
Save the weight vectors to a *.wts file |
void |
setColumns(int columns)
Set number of columns |
void |
setRows(int rows)
Set number of rows |
static int |
squaredEuclideanGridDistance(int row1,
int col1,
int row2,
int col2)
Squared Euclidean distance on rectangular grids. |
| Methods inherited from class databionics.esom.grid.MatrixGrid |
|---|
getNeuron, getWeights, init, setDim, setSize |
| Methods inherited from class databionics.esom.grid.Grid |
|---|
dim, findNeighbors, getDistanceFunction, getDistanceFunctionName, init, init, setDistanceFunction, setDistanceFunction, size, transformRadius |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected int rows
protected int columns
| Constructor Detail |
|---|
public RectangularGrid()
public RectangularGrid(int rows,
int cols,
int dim)
rows - Rows of gridcols - Columns of griddim - number of weights per neuron| Method Detail |
|---|
public static int coordinates2index(int row,
int col,
int columns)
row - row number on gridcol - column number on gridcolumns - number of columns in grid
public static int index2row(int index,
int columns)
index - unique index of neuroncolumns - number of columns in grid
public static int index2col(int index,
int columns)
index - unique index of neuroncolumns - number of columns in grid
public static int manhattanGridDistance(int row1,
int col1,
int row2,
int col2)
row1 - row number on gridcol1 - column number on gridrow2 - row number on gridcol2 - column number on grid
public static int squaredEuclideanGridDistance(int row1,
int col1,
int row2,
int col2)
row1 - row number on gridcol1 - column number on gridrow2 - row number on gridcol2 - column number on grid
public static int maximumGridDistance(int row1,
int col1,
int row2,
int col2)
row1 - row number on gridcol1 - column number on gridrow2 - row number on gridcol2 - column number on grid
public void init(java.lang.String method,
Descriptives desc,
cern.jet.random.engine.RandomEngine random)
init in class Gridmethod - name of initialization methoddesc - statistics about the training datarandom - An already existing random number generator.
public cern.colt.matrix.DoubleMatrix1D getNeuron(int row,
int col)
row - row number on gridcol - column number on gridpublic int getColumns()
public void setColumns(int columns)
columns - number of columnspublic int getRows()
public void setRows(int rows)
rows - number of rows
public int coordinates2index(int row,
int col)
row - row number on gridcol - column number on grid
public int index2row(int index)
index - unique index of neuron
public int index2col(int index)
index - unique index of neuron
public abstract int gridDistance(int row1,
int col1,
int row2,
int col2)
row1 - row number on gridcol1 - column number on gridrow2 - row number on gridcol2 - column number on gridpublic boolean saveWeights(java.lang.String filename)
filename - name of the file
public boolean saveWeights(java.lang.String filename,
StringList comment)
filename - Name of the filecomment - Comment block with training parameterspublic static RectangularGrid loadWeights(java.lang.String filename)
filename - Name of the file
public WtsFile getWts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||