00001 /*********************************************************************** 00002 Copyright (C) 2005,2006 Frédéric HENRY <neryel@reveries.info> 00003 00004 This file is part of ASpiReNN. 00005 00006 ASpiReNN is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published 00008 by the Free Software Foundation; either version 2 of the License, 00009 or (at your option) any later version. 00010 00011 ASpiReNN is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with ASpiReNN; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 00019 02111-1307 USA. 00020 00021 ***********************************************************************/ 00022 00023 #ifndef _STDP_H_ 00024 #define _STDP_H_ 00025 00026 #include "object.h" 00027 #include "learning.h" 00028 00046 typedef double (* aspi_stdp_variant_t) (double delta, double weight, double alpha); 00047 00051 enum aspi_stdp_flags 00052 { 00053 ASPI_STDP_LTP_ADDITIVE = 1<<0, 00054 ASPI_STDP_LTP_MULTIPLICATIVE = 1<<1, 00055 ASPI_STDP_LTD_ADDITIVE = 1<<2, 00056 ASPI_STDP_LTD_MULTIPLICATIVE = 1<<3, 00057 ASPI_STDP_EXCI_ONLY = 1 << 4, 00058 ASPI_STDP_INHIB_ONLY = 1 <<5, 00059 ASPI_STDP_ALL_SYNAPSES = 1 <<6 00060 }; 00061 00062 00063 //double aspi_stdp (double delta, double weight, double alpha_plus, double alpha_neg); 00064 //void aspi_stdp (aspi_object_t * self, int from, int to, double alpha_plus, double alpha_neg); 00065 extern aspi_learning_rule_t aspi_stdp; 00066 extern aspi_learning_rule_t aspi_stdp_ata; 00067 //void * aspi_stdp2 (void); 00068 00069 //double aspi_stdp_rossum (double delta, double weight, double alpha_plus, double alpha_neg); 00070 //ndouble aspi_stdp_default (double delta, double weight, double alpha_plus, double alpha_neg); 00071 //double aspi_stdp_additive (double delta, double weight, double alpha_plus, double alpha_neg); 00072 //double aspi_stdp_exci (double delta, double weight, double alpha_plus, double alpha_neg); 00073 //double aspi_stdp_inhib (double delta, double weight, double alpha_plus, double alpha_neg); 00074 00075 void aspi_stdp_set_tau (double tau); 00076 void aspi_stdp_set_flags (int flags); 00077 void aspi_stdp_set_regulation_frequence (double freq); 00078 void aspi_stdp_set_ltp_exci (aspi_stdp_variant_t rule); 00079 void aspi_stdp_set_ltd_exci (aspi_stdp_variant_t rule); 00080 void aspi_stdp_set_ltp_inhib (aspi_stdp_variant_t rule); 00081 void aspi_stdp_set_ltd_inhib (aspi_stdp_variant_t rule); 00082 00083 void aspi_stdp_ata_set_balanced (int balanced); 00084 00085 extern aspi_stdp_variant_t aspi_stdp_sym_relative; 00086 extern aspi_stdp_variant_t aspi_stdp_sym_absolute; 00087 extern aspi_stdp_variant_t aspi_stdp_asym_relative; 00088 extern aspi_stdp_variant_t aspi_stdp_asym_absolute; 00089 extern aspi_stdp_variant_t aspi_stdp_asym_balanced; 00090 00091 00092 #endif /* _STDP_H_ */ 00093