Projection.h

Go to the documentation of this file.
00001 /************************************************************************
00002 * Verve                                                                 *
00003 * Copyright (C) 2004-2006                                               *
00004 * Tyler Streeter  tylerstreeter@gmail.com                               *
00005 * All rights reserved.                                                  *
00006 * Web: http://verve-agents.sourceforge.net                              *
00007 *                                                                       *
00008 * This library is free software; you can redistribute it and/or         *
00009 * modify it under the terms of EITHER:                                  *
00010 *   (1) The GNU Lesser General Public License as published by the Free  *
00011 *       Software Foundation; either version 2.1 of the License, or (at  *
00012 *       your option) any later version. The text of the GNU Lesser      *
00013 *       General Public License is included with this library in the     *
00014 *       file license-LGPL.txt.                                          *
00015 *   (2) The BSD-style license that is included with this library in     *
00016 *       the file license-BSD.txt.                                       *
00017 *                                                                       *
00018 * This library is distributed in the hope that it will be useful,       *
00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
00021 * license-LGPL.txt and license-BSD.txt for more details.                *
00022 ************************************************************************/
00023 
00024 #ifndef VERVE_PROJECTION_H
00025 #define VERVE_PROJECTION_H
00026 
00027 #include "Globals.h"
00028 
00029 namespace verve
00030 {
00031         class Population;
00032         class Neuron;
00033         class Connection;
00034 
00036         enum InitialWeightMethod
00037         {
00039                 IDEAL_NOISE,
00040 
00042                 WEIGHTS_NEAR_0,
00043 
00045                 WEIGHTS_NEAR_1
00046         };
00047 
00050         class Projection
00051         {
00052         public:
00053                 VERVE_DECL Projection();
00054 
00056                 VERVE_DECL virtual ~Projection();
00057 
00062                 VERVE_DECL virtual void VERVE_CALL init(Population* pop1, 
00063                         Population* pop2, InitialWeightMethod initWeightMethod, 
00064                         real maxInputPopActivationSum);
00065 
00070                 VERVE_DECL virtual void VERVE_CALL init(Population* pop, 
00071                         Neuron* neuron, InitialWeightMethod initWeightMethod, 
00072                         real maxInputPopActivationSum);
00073 
00078                 VERVE_DECL virtual void VERVE_CALL init(Neuron* neuron, 
00079                         Population* pop, InitialWeightMethod initWeightMethod, 
00080                         real maxInputPopActivationSum);
00081 
00083                 VERVE_DECL virtual void VERVE_CALL resetShortTermMemory();
00084 
00087                 VERVE_DECL virtual void VERVE_CALL addPreNeuron(Neuron* neuron);
00088 
00090                 VERVE_DECL virtual unsigned int VERVE_CALL getNumConnections()const;
00091 
00093                 VERVE_DECL virtual Connection* VERVE_CALL getConnection(
00094                         unsigned int i);
00095 
00099                 //VERVE_DECL virtual void VERVE_CALL applyUniformNoise(real min, 
00100                 //      real max);
00101 
00104                 //VERVE_DECL virtual void VERVE_CALL applyGaussianNoise(real variance);
00105 
00111                 //VERVE_DECL virtual void VERVE_CALL applyIdealInitialNoise();
00112 
00113         protected:
00115                 void clear();
00116 
00119                 void setInitialConnectionWeights();
00120 
00123                 void setInitialConnectionWeight(Connection* c);
00124 
00126                 void createConnections(Neuron* neuron, Population* pop);
00127 
00130                 void storeTargetNeuronReferences(Population* pop);
00131 
00134                 void storeTargetNeuronReferences(Neuron* neuron);
00135 
00139                 virtual void connectNeurons(Neuron* neuron1, 
00140                         Neuron* neuron2);
00141 
00143                 std::vector<Connection*> mConnections;
00144 
00147                 std::vector<Neuron*> mTargetNeurons;
00148 
00150                 InitialWeightMethod mInitialWeightMethod;
00151 
00154                 real mMaxInputPopActivationSum;
00155         };
00156 }
00157 
00158 #endif

Generated on Tue Jan 24 21:46:37 2006 for Verve by  doxygen 1.4.6-NO