Moved neuralnet classes into own library
This commit is contained in:
@@ -1,35 +1,6 @@
|
||||
QT += core
|
||||
QT -= gui widgets
|
||||
TEMPLATE = subdirs
|
||||
|
||||
DBLIBS +=
|
||||
SUBDIRS += neuralnetdemo \
|
||||
neuralnetlib
|
||||
|
||||
TARGET = neuralnet
|
||||
|
||||
PROJECT_ROOT = ..
|
||||
|
||||
SOURCES += main.cpp \
|
||||
neuron.cpp \
|
||||
neurallayer.cpp \
|
||||
neuralnet.cpp \
|
||||
neuralfactor.cpp \
|
||||
debug.cpp
|
||||
|
||||
HEADERS += \
|
||||
neuralfactor.h \
|
||||
interfaces/ineuronreceptor.h \
|
||||
interfaces/ineuronsignal.h \
|
||||
interfaces/ineuron.h \
|
||||
interfaces/ineurallayer.h \
|
||||
interfaces/ineuralnet.h \
|
||||
neuron.h \
|
||||
neurallayer.h \
|
||||
neuralnet.h \
|
||||
debug.h
|
||||
|
||||
FORMS +=
|
||||
|
||||
RESOURCES +=
|
||||
|
||||
TRANSLATIONS +=
|
||||
|
||||
include($${PROJECT_ROOT}/app.pri)
|
||||
neuralnetdemo.depends += neuralnetlib
|
||||
|
18
neuralnetdemo/neuralnetdemo.pro
Normal file
18
neuralnetdemo/neuralnetdemo.pro
Normal file
@@ -0,0 +1,18 @@
|
||||
QT += core
|
||||
QT -= gui widgets
|
||||
|
||||
DBLIBS += neuralnetlib
|
||||
|
||||
PROJECT_ROOT = ../..
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
HEADERS +=
|
||||
|
||||
FORMS +=
|
||||
|
||||
RESOURCES +=
|
||||
|
||||
TRANSLATIONS +=
|
||||
|
||||
include($${PROJECT_ROOT}/app.pri)
|
@@ -1,9 +1,6 @@
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
#pragma once
|
||||
|
||||
class QString;
|
||||
|
||||
bool initDebug();
|
||||
void debug(const QString &line);
|
||||
|
||||
#endif // DEBUG_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef INEURALLAYER_H
|
||||
#define INEURALLAYER_H
|
||||
#pragma once
|
||||
|
||||
#include <QList>
|
||||
|
||||
@@ -17,5 +16,3 @@ public:
|
||||
virtual QList<INeuron *> &neurons() = 0;
|
||||
virtual const QList<INeuron *> &neurons() const = 0;
|
||||
};
|
||||
|
||||
#endif // INEURALLAYER_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef INEURALNET_H
|
||||
#define INEURALNET_H
|
||||
#pragma once
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
@@ -19,5 +18,3 @@ public:
|
||||
virtual const INeuralLayer *hiddenLayer() const = 0;
|
||||
virtual const INeuralLayer *outputLayer() const = 0;
|
||||
};
|
||||
|
||||
#endif // INEURALNET_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef INEURON_H
|
||||
#define INEURON_H
|
||||
#pragma once
|
||||
|
||||
#include "ineuronsignal.h"
|
||||
#include "ineuronreceptor.h"
|
||||
@@ -20,5 +19,3 @@ public:
|
||||
virtual NeuralFactor *bias() = 0;
|
||||
virtual const NeuralFactor *bias() const = 0;
|
||||
};
|
||||
|
||||
#endif // INEURON_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef INEURONRECEPTOR_H
|
||||
#define INEURONRECEPTOR_H
|
||||
#pragma once
|
||||
|
||||
template <class Key, class T> class QMap;
|
||||
|
||||
@@ -12,5 +11,3 @@ public:
|
||||
virtual QMap<INeuronSignal *, NeuralFactor *> &input() = 0;
|
||||
virtual const QMap<INeuronSignal *, NeuralFactor *> &input() const = 0;
|
||||
};
|
||||
|
||||
#endif // INEURONRECEPTOR_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef INEURONSIGNAL_H
|
||||
#define INEURONSIGNAL_H
|
||||
#pragma once
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
@@ -9,5 +8,3 @@ public:
|
||||
virtual qreal output() const = 0;
|
||||
virtual void setOutput(qreal output) = 0;
|
||||
};
|
||||
|
||||
#endif // INEURONSIGNAL_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef NEURALFACTOR_H
|
||||
#define NEURALFACTOR_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <qglobal.h>
|
||||
@@ -32,5 +31,3 @@ private:
|
||||
qreal m_weight;
|
||||
qreal m_delta;
|
||||
};
|
||||
|
||||
#endif // NEURALFACTOR_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef NEURALLAYER_H
|
||||
#define NEURALLAYER_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
@@ -29,5 +28,3 @@ private:
|
||||
NeuralNet *m_neuralNet;
|
||||
QList<INeuron *> m_neurons;
|
||||
};
|
||||
|
||||
#endif // NEURALLAYER_H
|
@@ -1,5 +1,4 @@
|
||||
#ifndef NEURALNET_H
|
||||
#define NEURALNET_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@@ -48,5 +47,3 @@ private:
|
||||
INeuralLayer *m_hiddenLayer;
|
||||
INeuralLayer *m_outputLayer;
|
||||
};
|
||||
|
||||
#endif // NEURALNET_H
|
33
neuralnetlib/neuralnetlib.pro
Normal file
33
neuralnetlib/neuralnetlib.pro
Normal file
@@ -0,0 +1,33 @@
|
||||
QT += core
|
||||
QT -= gui widgets
|
||||
|
||||
DBLIBS +=
|
||||
|
||||
PROJECT_ROOT = ../..
|
||||
|
||||
SOURCES += \
|
||||
neuron.cpp \
|
||||
neurallayer.cpp \
|
||||
neuralnet.cpp \
|
||||
neuralfactor.cpp \
|
||||
debug.cpp
|
||||
|
||||
HEADERS += \
|
||||
neuralfactor.h \
|
||||
neuron.h \
|
||||
neurallayer.h \
|
||||
neuralnet.h \
|
||||
debug.h \
|
||||
interfaces/ineuronreceptor.h \
|
||||
interfaces/ineuronsignal.h \
|
||||
interfaces/ineuron.h \
|
||||
interfaces/ineurallayer.h \
|
||||
interfaces/ineuralnet.h
|
||||
|
||||
FORMS +=
|
||||
|
||||
RESOURCES +=
|
||||
|
||||
TRANSLATIONS +=
|
||||
|
||||
include($${PROJECT_ROOT}/lib.pri)
|
@@ -1,5 +1,4 @@
|
||||
#ifndef NEURON_H
|
||||
#define NEURON_H
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
@@ -55,5 +54,3 @@ private:
|
||||
qreal m_error;
|
||||
NeuralFactor *m_bias;
|
||||
};
|
||||
|
||||
#endif // NEURON_H
|
Reference in New Issue
Block a user