Skip to content
Snippets Groups Projects
Commit 66e62e12 authored by Michal Kravcenko's avatar Michal Kravcenko
Browse files

ADD: added a new connection type to represent a never-changing edge

parent 6096eeb6
No related branches found
No related tags found
No related merge requests found
/**
* DESCRIPTION OF THE FILE
*
* @author Michal Kravčenko
* @date 15.3.19 -
*/
#include "ConnectionFunctionConstant.h"
ConnectionFunctionConstant::ConnectionFunctionConstant(double w) {
this->weight = w;
}
ConnectionFunctionConstant::~ConnectionFunctionConstant() {
}
double ConnectionFunctionConstant::eval(std::vector<double> &parameter_space) {
return this->weight;
}
void ConnectionFunctionConstant::eval_partial_derivative(std::vector<double> &parameter_space,
std::vector<double> &weight_gradient, double alpha) {
}
\ No newline at end of file
/**
* DESCRIPTION OF THE FILE
*
* @author Michal Kravčenko
* @date 15.3.19 -
*/
#ifndef LIB4NEURO_CONNECTIONFUNCTIONCONSTANT_H
#define LIB4NEURO_CONNECTIONFUNCTIONCONSTANT_H
#include "../settings.h"
#include "ConnectionFunctionGeneral.h"
class ConnectionFunctionConstant:public ConnectionFunctionGeneral {
private:
double weight;
public:
LIB4NEURO_API ConnectionFunctionConstant(double w);
LIB4NEURO_API ~ConnectionFunctionConstant();
LIB4NEURO_API double eval( std::vector<double> &parameter_space ) override;
LIB4NEURO_API void eval_partial_derivative(std::vector<double> &parameter_space, std::vector<double> &weight_gradient, double alpha) override;
};
#endif //LIB4NEURO_CONNECTIONFUNCTIONCONSTANT_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment