Imported existing sources

This commit is contained in:
0xFEEDC0DE64
2018-09-15 20:51:15 +02:00
parent 09639315d6
commit 2a15afd678
17 changed files with 871 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef INEURALLAYER_H
#define INEURALLAYER_H
#include <QList>
class INeuron;
class INeuralNet;
class INeuralLayer
{
public:
virtual void pulse() = 0;
virtual void applyLearning() = 0;
virtual void initializeLearning() = 0;
virtual INeuron *addNeuron(qreal bias) = 0;
virtual QList<INeuron *> &neurons() = 0;
virtual const QList<INeuron *> &neurons() const = 0;
};
#endif // INEURALLAYER_H
+23
View File
@@ -0,0 +1,23 @@
#ifndef INEURALNET_H
#define INEURALNET_H
#include <qglobal.h>
class INeuralLayer;
class INeuralNet
{
public:
virtual void pulse() = 0;
virtual void applyLearning() = 0;
virtual void initializeLearning() = 0;
virtual qreal learningRate() const = 0;
virtual void setLearningRate(qreal learningRate) = 0;
virtual const INeuralLayer *inputLayer() const = 0;
virtual const INeuralLayer *hiddenLayer() const = 0;
virtual const INeuralLayer *outputLayer() const = 0;
};
#endif // INEURALNET_H
+24
View File
@@ -0,0 +1,24 @@
#ifndef INEURON_H
#define INEURON_H
#include "ineuronsignal.h"
#include "ineuronreceptor.h"
class INeuralLayer;
class NeuralFactor;
class INeuron : public INeuronSignal, public INeuronRepetor
{
public:
virtual void pulse() = 0;
virtual void applyLearning(qreal learningRate) = 0;
virtual void initializeLearning() = 0;
virtual qreal error() const = 0;
virtual void setError(qreal error) = 0;
virtual NeuralFactor *bias() = 0;
virtual const NeuralFactor *bias() const = 0;
};
#endif // INEURON_H
+16
View File
@@ -0,0 +1,16 @@
#ifndef INEURONRECEPTOR_H
#define INEURONRECEPTOR_H
template <class Key, class T> class QMap;
class INeuronSignal;
class NeuralFactor;
class INeuronRepetor
{
public:
virtual QMap<INeuronSignal *, NeuralFactor *> &input() = 0;
virtual const QMap<INeuronSignal *, NeuralFactor *> &input() const = 0;
};
#endif // INEURONRECEPTOR_H
+13
View File
@@ -0,0 +1,13 @@
#ifndef INEURONSIGNAL_H
#define INEURONSIGNAL_H
#include <qglobal.h>
class INeuronSignal
{
public:
virtual qreal output() const = 0;
virtual void setOutput(qreal output) = 0;
};
#endif // INEURONSIGNAL_H