Skip to content
Snippets Groups Projects
NeuronConstant.cpp 844 B
/**
 * DESCRIPTION OF THE FILE
 *
 * @author Michal Kravčenko
 * @date 8.8.18 -
 */

#include <boost/serialization/export.hpp>

//#include "NeuronConstant.h"
//#include "NeuronSerialization.h"
#include "NeuronConstantSerialization.h"


BOOST_CLASS_EXPORT_IMPLEMENT(lib4neuro::NeuronConstant);

namespace lib4neuro {

    NeuronConstant::NeuronConstant(double c) {
        this->p = c;
    }

    double NeuronConstant::activate(double x, double b) {
        return this->p;
    }

    double NeuronConstant::activation_function_eval_derivative_bias(double x, double b) {
        return 0.0;
    }

    double NeuronConstant::activation_function_eval_derivative(double x, double b) {
        return 0.0;
    }

    Neuron *NeuronConstant::get_derivative() {
        NeuronConstant *output = new NeuronConstant();
        return output;
    }

}