Skip to content
Snippets Groups Projects
NeuronBinary.cpp 523 B

#include <boost/serialization/export.hpp>

#include "NeuronSerialization.h"
#include "NeuronBinarySerialization.h"
#include "NeuronBinary.h"

BOOST_CLASS_EXPORT_IMPLEMENT(lib4neuro::NeuronBinary)

namespace lib4neuro {
    NeuronBinary::NeuronBinary() {}

    double NeuronBinary::activate(double x,
                                  double b) {

        if (x >= b) {
            this->activation_val = 1.0;
        } else {
            this->activation_val = 0.0;
        }

        return this->activation_val;
    }

}