neural_net::Hexagonal_topology< Index_type > Class Template Reference

Topology for neural network that calculates distance between two neurons. More...

#include <wtm_topology.hpp>

Inheritance diagram for neural_net::Hexagonal_topology< Index_type >:

Inheritance graph
[legend]
Collaboration diagram for neural_net::Hexagonal_topology< Index_type >:

Collaboration graph
[legend]

Public Member Functions

Protected Attributes


Detailed Description

template<typename Index_type>
class neural_net::Hexagonal_topology< Index_type >

Topology for neural network that calculates distance between two neurons.

Parameters:
Index_type is a type of index.

\begin{eqnarray*} h_1 (x) & = & \frac{ x_1 + 1 }{2} + x_2\\ h_2 (x) & = & \frac{h_{off}}{2} + x_2 - x_1 / 2;\\ t_1 & = & \max ( h_1 (n), h_1 (m) ) - \min ( h_1 (n), h_1 (m) )\\ t_2 & = & \max ( h_2 (n), h_2 (m) ) - \min ( h_2 (n), h_2 (m) )\\ d (n,m) & = & \left\{ \begin{array}{ll} \max (|t_1|,|t_2|) & if \; sign \; of \; t_1 \; and \; t_2 \; is \; the \; same\\ |t_1|+|t_2| & otherwise \end{array} \right. \end{eqnarray*}


Constructor & Destructor Documentation

template<typename Index_type>
neural_net::Hexagonal_topology< Index_type >::Hexagonal_topology const Index_type &  hex_offset_  )  throw () [inline, explicit]
 

Constructor.

Parameters:
hex_offset_ is an offset of the hexagonal topology. This value have to be not less than number of rows in neuron container counted from 0.

template<typename Index_type>
template<typename Index_type_2>
neural_net::Hexagonal_topology< Index_type >::Hexagonal_topology const Hexagonal_topology< Index_type_2 > &  hex_topology  )  throw () [inline]
 

Copy constructor.


Member Function Documentation

template<typename Index_type>
const Index_type neural_net::Hexagonal_topology< Index_type >::operator() const Index_type &  index_1_1,
const Index_type &  index_1_2,
const Index_type &  index_2_1,
const Index_type &  index_2_2
throw () [inline]
 

Function calculates distance.

Parameters:
index_1_1 is first index of first neuron.
index_1_2 is second index of first neuron.
index_2_1 is first index of second neuron.
index_2_2 is second index of second neuron.

\begin{eqnarray*} h_1 (x) & = & \frac{ x_1 + 1 }{2} + x_2\\ h_2 (x) & = & \frac{h_{off}}{2} + x_2 - x_1 / 2;\\ t_1 & = & \max ( h_1 (n), h_1 (m) ) - \min ( h_1 (n), h_1 (m) )\\ t_2 & = & \max ( h_2 (n), h_2 (m) ) - \min ( h_2 (n), h_2 (m) )\\ d (n,m) & = & \left\{ \begin{array}{ll} \max (|t_1|,|t_2|) & if \; sign \; of \; t_1 \; and \; t_2 \; is \; the \; same\\ |t_1|+|t_2| & otherwise \end{array} \right. \end{eqnarray*}

where: n is firs neuron, m is second.


Field Documentation

template<typename Index_type>
Index_type neural_net::Hexagonal_topology< Index_type >::hex_offset [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Jun 28 14:39:54 2006 for Kohonen Neural Network Library Demo by  doxygen 1.4.6