Package tests.MSOM
Class SOM
- All Implemented Interfaces:
Serializable
,Runnable
Workers of the MSOM containing a part of the neural network and communicating with neighbours (TOP, LEFT, BOTTOM, RIGHT)
Receiving instructions from Emitter and sending results to Collector
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) double[]
(package private) bestPosition
static final int
static final int
(package private) int
static final int
static final int
int
static final int
(package private) int
static final int
(package private) double[][][]
static final int
int
Fields inherited from class bbflow.defaultJob
combined, combined_side, CUSTOM_FUNCTION, id, in, INLINE, INLINE_MULTI, out, position, runType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
learnVector
(double[] neuron, int besti, int bestj) (package private) void
learnVector
(double[] neuron, int i, int j, double curve) (package private) void
void
runJob()
blank function that should be overwritten by class extending bbflow.defaultJob.searchBestPosition
(double[] d_neuron) private void
Methods inherited from class bbflow.defaultWorker
preload
Methods inherited from class bbflow.defaultJob
addInputChannel, addOutputChannel, EOS, getInputChannel, getOutputChannel, init, removeInputChannel, removeOutputChannel, run, runJob, runJobMulti, sendEOS, sendEOS, sendOut, sendOut, sendOutTo, sendOutTo, sendOutToAll, setId, uniqueJob, uniqueJob
-
Field Details
-
TOP
public static final int TOP- See Also:
-
LEFT
public static final int LEFT- See Also:
-
BOTTOM
public static final int BOTTOM- See Also:
-
RIGHT
public static final int RIGHT- See Also:
-
waiting_learners
public int waiting_learners -
SLAVE
public static final int SLAVE- See Also:
-
LEARNING
public static final int LEARNING- See Also:
-
mode
public int mode -
circ
public static final int circ- See Also:
-
som
double[][][] som -
size
int size -
depth
int depth -
AIT_result
bestPosition AIT_result -
AIT_neuron
double[] AIT_neuron
-
-
Constructor Details
-
SOM
public SOM(int w, int h, int d, int id) -
SOM
public SOM(int w, int h, int d, double[][][] som, int id)
-
-
Method Details
-
runJob
Description copied from class:defaultJob
blank function that should be overwritten by class extending bbflow.defaultJob. Here main computation task is done once we're sure there's data in at least one of the input channels Lists 'in' and 'out' must be used manually and EOS() must be managed by the user.- Overrides:
runJob
in classdefaultJob<SOMData,
SOMData> - Throws:
InterruptedException
-
randomize
void randomize() -
normalize
-
searchBestPosition
-
learnVector
void learnVector(double[] neuron, int i, int j, double curve) -
learnVector
void learnVector(double[] neuron, int besti, int bestj) -
train
-