Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

nkern_neuron.h

Go to the documentation of this file.
00001 
00002 // Name:        nkern_neuron.h
00003 // Purpose:     header for nkernel neuron code
00004 // Author:      Chad Rempp
00005 // Modified by: Chad Rempp
00006 // Created:     03-01-02
00007 // Copyright:   (c) 2003 Chad Rempp
00008 // Licence:     GNU Public License (hey it's what all my friends are doing)
00010 #ifndef NKERN_NEURON_H
00011 #define NKERN_NEURON_H
00012 
00013 #include <vector>
00014 #include <fstream>
00015 #include <math.h>
00016 
00017 //using namespace std;
00018 
00019 // Structure for user defined variables
00020 struct SimData_typ{
00021     int NumInputs;
00022     int NumOutputs;
00023     int NumHiddenLayers;
00024     int NeuronsPerLayer;
00025     int NeuronsPerHLayer;
00026 };
00027 
00028 #define RANDOM_CLAMP    (((float)rand()-(float)rand())/RAND_MAX)
00029 #define RANDOM_NUM      ((float)rand()/(RAND_MAX+1))
00030 
00031 // Default values for an NN
00032 #define NUM_INPUTS             6
00033 #define NUM_OUTPUTS            2
00034 #define DEFAULT_HIDDEN_LAYERS  1
00035 #define DEFAULT_NEURONS_PER_HL 9
00036 
00037 //for tweaking the sigmoid response curve
00038 #define ACTIVATION_RESPONSE             1.0f
00039 #define BIAS                            -1.0f
00040 
00042 // Neuron structure Declaration
00044 struct Neuron
00045 {
00046     int             m_NumInputs;
00047     vector<float>   m_vecWeight;
00048     Neuron(int NumInputs);
00049 };
00050 
00052 // NeuronLayer Structure Declaration
00054 struct NeuronLayer
00055 {
00056     vector<Neuron>      m_vecNeurons;
00057     int                 m_NumNeurons;
00058     int                 m_NumInputsPerNeuron;
00059     NeuronLayer(int NumNeurons, 
00060                 int NumInputsPerNeuron);
00061 };
00062 
00063 #endif

Generated on Mon Jun 23 23:09:52 2003 for NeReK Documentation by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002