/* 
 * Thomas Pantzer: neuro_gas.h, v0.1b  23.9.97 22:29 
 * Thomas Pantzer: neuro_gas.h, v0.4.7  8.6.99 16:32 
 * 
 * 
 * Copyright 1997 by Thomas Pantzer
 * 
 * Permission to use, copy, modify, and distribute this software for noncommercial 
 * use and without fee is hereby granted, provided that the above copyright notice 
 * appear in all copies and that both that copyright notice and this permission 
 * notice appear in supporting documentation, and that the name of the Author not be 
 * used in advertising or publicity pertaining to distribution of the software 
 * without specific, written prior permission. The Author makes no representations about
 * the suitability of this software for any purpose.  It is provided "as is" 
 * without expressed or implied warranty. 
 * 
 * 
 * pantec@aix520.informatik.uni-leipzig.de   (Thomas Pantzer) 
 * 
 */



#ifndef NEURO_GAS_H
#define NEURO_GAS_H


// #include <stdio.h>
#include "neuronal.h"
#include "trigonom.h"
#include "khepera.h"


class t_SOM {
public:
   t_vector Size,Anchor,Cnt;
   t_Neuron *root,*actual,*last_winner;
   int age,N;
   char add_new;
   double last_dist,last_diff;
   
   void Init(int, int);
   void Done(void);
   
   void Create(int x, int y);
   
   t_Neuron *GetWinner(t_vector *,int);
   t_Neuron *Add(t_vector *pos);
   char Update(t_vector *pos);

   void ProcessInput(t_vector *,int);
   void ResetLinks(t_Neuron *);
   void CalcSize(void);
   
 
   void Show(void);
};


#endif







/**/
/**/
/**/
/**/
/**/
/**/
/**/
/**/
/*****  End Of File  ****************************/
