contourNeuronProp2.H

Go to the documentation of this file.
00001 /*!@file contourNeuronProp2.H CINNIC classes */
00002 //! Holds the property for each neuron
00003 /*! this class is used to process and hold the membrane potential
00004   of each neuron. It keeps track of total potential as well as
00005   potential that is "up" or "down" that is, to simulate the
00006   effects of tranfering energy from neuron to another neuron it
00007   holds energy in either a positive or negative energy bank.
00008 */
00009 
00010 #include "CINNIC/contourNeuron.H"
00011 #include "CINNIC/contourDefine.H"
00012 #include "CINNIC/staticContourNeuronProp.H"
00013 
00014 // //////////////////////////////////////////////////////////////////// //
00015 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
00016 // University of Southern California (USC) and the iLab at USC.         //
00017 // See http://iLab.usc.edu for information about this project.          //
00018 // //////////////////////////////////////////////////////////////////// //
00019 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00020 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00021 // in Visual Environments, and Applications'' by Christof Koch and      //
00022 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00023 // pending; application number 09/912,225 filed July 23, 2001; see      //
00024 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00025 // //////////////////////////////////////////////////////////////////// //
00026 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00027 //                                                                      //
00028 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00029 // redistribute it and/or modify it under the terms of the GNU General  //
00030 // Public License as published by the Free Software Foundation; either  //
00031 // version 2 of the License, or (at your option) any later version.     //
00032 //                                                                      //
00033 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00034 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00035 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00036 // PURPOSE.  See the GNU General Public License for more details.       //
00037 //                                                                      //
00038 // You should have received a copy of the GNU General Public License    //
00039 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00040 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00041 // Boston, MA 02111-1307 USA.                                           //
00042 // //////////////////////////////////////////////////////////////////// //
00043 //
00044 // Primary maintainer for this file: T. Nathan Mundhenk <mundhenk@usc.edu>
00045 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/CINNIC/contourNeuronProp2.H $
00046 // $Id: contourNeuronProp2.H 6393 2006-03-26 00:57:36Z rjpeters $
00047 //
00048 
00049 // ############################################################
00050 // ############################################################
00051 // ##### ---CINNIC2---
00052 // ##### Contour Integration:
00053 // ##### T. Nathan Mundhenk nathan@mundhenk.com
00054 // ############################################################
00055 // ############################################################
00056 
00057 #ifndef CONTOURNEURONPROP2_H_DEFINED
00058 #define CONTOURNEURONPROP2_H_DEFINED
00059 
00060 #include "CINNIC/staticContourNeuronProp.H"
00061 
00062 //! Holds generally temporal neuron properties
00063 template <class FLOAT, class INT> class ContourNeuronProp2
00064 {
00065 private:
00066   //! This neurons charge
00067   FLOAT            CNP_charge;
00068   //! store fast plasticity term
00069   FLOAT            CNP_fastPlasticity;
00070   //! pointer to this neurons temporally static values
00071   staticContourNeuronProp<FLOAT,INT> *CNP_staticMap;
00072 public:
00073 
00074   //! default constructor on this neuron
00075   ContourNeuronProp2();
00076   //! destructor
00077   ~ContourNeuronProp2();
00078   //! link this dynamic neuron to its static component
00079   inline void CNP_linkToStaticMap(staticContourNeuronProp<FLOAT,INT>
00080                                   *staticMap);
00081   //! return this neurons charge
00082   inline FLOAT CNP_getCharge() const;
00083   //! reset base charge
00084   inline void CNP_resetCharge();
00085   //! set the charge on this neuron
00086   inline void CNP_chargeSimple(const FLOAT _charge);
00087   //! set the fast plasticity of this neuron
00088   inline void CNP_setFastPlast(const FLOAT plast);
00089   //! get this neurons fast plasticity
00090   inline FLOAT CNP_getFastPlast() const;
00091   //! compute supression on this neuron
00092   inline FLOAT CNP_computeSupress(const FLOAT inputVal,
00093                                   const FLOAT groupMod) const;
00094   //! compute Excitation on this neuron
00095   inline FLOAT CNP_computeExcite(const FLOAT inputVal,
00096                                  const FLOAT groupMod) const;
00097 };
00098 
00099 //#################################################################
00100 template <class FLOAT, class INT>
00101 ContourNeuronProp2<FLOAT,INT>::ContourNeuronProp2()
00102   :
00103   CNP_charge(),
00104   CNP_fastPlasticity(),
00105   CNP_staticMap(0)
00106 {}
00107 
00108 //#################################################################
00109 template <class FLOAT, class INT>
00110 ContourNeuronProp2<FLOAT,INT>::~ContourNeuronProp2()
00111 {}
00112 
00113 //#################################################################
00114 template <class FLOAT, class INT>
00115 inline void ContourNeuronProp2<FLOAT,INT>::CNP_linkToStaticMap(
00116                                           staticContourNeuronProp<FLOAT,INT>
00117                                           *staticMap)
00118 {
00119   CNP_staticMap = staticMap;
00120 }
00121 
00122 //#################################################################
00123 template <class FLOAT, class INT>
00124 inline FLOAT ContourNeuronProp2<FLOAT,INT>::CNP_getCharge() const
00125 {
00126   return CNP_charge;
00127 }
00128 
00129 //#################################################################
00130 template <class FLOAT, class INT>
00131 inline void ContourNeuronProp2<FLOAT,INT>::CNP_resetCharge()
00132 {
00133   CNP_charge = 0;
00134 }
00135 
00136 //#################################################################
00137 template <class FLOAT, class INT>
00138 inline void ContourNeuronProp2<FLOAT,INT>::CNP_chargeSimple(const FLOAT charge)
00139 {
00140   CNP_charge += charge;
00141 }
00142 
00143 //#################################################################
00144 template <class FLOAT, class INT>
00145 inline void ContourNeuronProp2<FLOAT,INT>::CNP_setFastPlast(const FLOAT plast)
00146 {
00147   CNP_fastPlasticity = plast;
00148 }
00149 
00150 //#################################################################
00151 template <class FLOAT, class INT>
00152 inline FLOAT ContourNeuronProp2<FLOAT,INT>::CNP_getFastPlast() const
00153 {
00154   return CNP_fastPlasticity;
00155 }
00156 
00157 
00158 //#################################################################
00159 template <class FLOAT, class INT>
00160 inline FLOAT ContourNeuronProp2<FLOAT,INT>::CNP_computeSupress(
00161                                             const FLOAT inputVal,
00162                                             const FLOAT groupMod) const
00163 {
00164   return ((groupMod/CNP_fastPlasticity) * inputVal);
00165   //return ((groupMod - CNP_fastPlasticity) * inputVal);
00166 }
00167 
00168 //#################################################################
00169 template <class FLOAT, class INT>
00170 inline FLOAT ContourNeuronProp2<FLOAT,INT>::CNP_computeExcite(
00171                                             const FLOAT inputVal,
00172                                             const FLOAT groupMod) const
00173 {
00174   return ((CNP_fastPlasticity/groupMod) * inputVal);
00175   //return ((CNP_fastPlasticity - groupMod) * inputVal);
00176 }
00177 
00178 // ######################################################################
00179 /* So things look consistent in everyone's emacs... */
00180 /* Local Variables: */
00181 /* indent-tabs-mode: nil */
00182 /* End: */
00183 
00184 #endif
Generated on Sun May 8 08:40:22 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3