Skip to content
Snippets Groups Projects
ConnectionFunctionGeneral.h 1.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • /**
     * DESCRIPTION OF THE FILE
     *
     * @author Michal Kravčenko
     * @date 14.6.18 -
     */
    
    #ifndef INC_4NEURO_CONNECTIONWEIGHT_H
    #define INC_4NEURO_CONNECTIONWEIGHT_H
    
    #include <functional>
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
    class ConnectionFunctionGeneral {
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        std::vector<double> * weight_array = nullptr;
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        std::vector<unsigned int> *param_indices = nullptr;
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        ConnectionFunctionGeneral();
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        ConnectionFunctionGeneral(std::vector<double>* w_array, std::vector<unsigned int> &param_indices, std::string &function_string);
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        virtual ~ConnectionFunctionGeneral();
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        virtual double eval( );
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
         * Performs partial derivative of this transfer function according to all parameters. Adds the values multiplied
         * by alpha to the corresponding gradient vector
    
    Michal Kravcenko's avatar
    Michal Kravcenko committed
        virtual void eval_partial_derivative(std::vector<double> &weight_gradient, double alpha);