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

nkern_neuron.cpp

Go to the documentation of this file.
00001 
00002 // Name:        nkern_neuron.cpp
00003 // Purpose:     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 
00011 #include "nkernel/nkern_neuron.h"
00012 
00013 extern SimData_typ g_SimData;
00014 
00016 // Neuron structure Implementation
00018 
00020 Neuron::Neuron(int NumInputs): m_NumInputs(NumInputs+1){
00021 
00022     //we need an additional weight for the bias hence the +1
00023     for (int i=0; i<NumInputs+1; i++){
00024         m_vecWeight.push_back(RANDOM_CLAMP);
00025     }
00026 }
00027 
00029 // NeuronLayer structure Implematation
00031 
00033 NeuronLayer::NeuronLayer(int NumNeurons, 
00034                            int NumInputsPerNeuron): m_NumNeurons(NumNeurons), 
00035                                                     m_NumInputsPerNeuron(NumInputsPerNeuron)
00036 {
00037     for (int i=0; i<NumNeurons; i++)
00038 
00039         m_vecNeurons.push_back(Neuron(NumInputsPerNeuron));
00040 }
00041 
00042 

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