initial documentation
This commit is contained in:
5
Makefile
5
Makefile
@@ -49,6 +49,9 @@ lib/Genetics.a: ./src/Genetics/Genetics.a
|
|||||||
genetics_build:
|
genetics_build:
|
||||||
@make -C src/Genetics
|
@make -C src/Genetics
|
||||||
|
|
||||||
|
documentation:
|
||||||
|
doxygen
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@make -C src/MachineLearning clean
|
@make -C src/MachineLearning clean
|
||||||
@make -C src/Genetics clean
|
@make -C src/Genetics clean
|
||||||
@@ -56,4 +59,4 @@ clean:
|
|||||||
@make -C tests clean
|
@make -C tests clean
|
||||||
#@rm -f ./*.so ./*.a ./*.nm
|
#@rm -f ./*.so ./*.a ./*.nm
|
||||||
@rm -f ./lib/*.so ./lib/*.a ./lib/*.nm
|
@rm -f ./lib/*.so ./lib/*.a ./lib/*.nm
|
||||||
@echo "Cleaned....."
|
@echo "Cleaned....."
|
||||||
|
|||||||
9
mainpage.dox
Normal file
9
mainpage.dox
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
@mainpage Artificial Neural Network Library project documentation
|
||||||
|
|
||||||
|
@brief C++ library for Artificial Neural Networks
|
||||||
|
|
||||||
|
@author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||||
|
|
||||||
|
TODO
|
||||||
|
*/
|
||||||
@@ -9,40 +9,117 @@
|
|||||||
#include "../Solution.h"
|
#include "../Solution.h"
|
||||||
#include "Neuron.h"
|
#include "Neuron.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Shin
|
namespace Shin
|
||||||
{
|
{
|
||||||
namespace NeuralNetwork
|
namespace NeuralNetwork
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @brief Default value for lambda
|
||||||
|
*/
|
||||||
const float lambda=0.8;
|
const float lambda=0.8;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||||
|
* @brief Abstract class for all Layers of neurons
|
||||||
|
*/
|
||||||
|
|
||||||
class Layer
|
class Layer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual ~Layer() {};
|
virtual ~Layer() {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is a virtual function for selecting neuron
|
||||||
|
* @param neuron is position in layer
|
||||||
|
* @returns Specific neuron
|
||||||
|
*/
|
||||||
|
|
||||||
virtual Neuron& operator[](const size_t& neuron)=0;
|
virtual Neuron& operator[](const size_t& neuron)=0;
|
||||||
|
/**
|
||||||
|
* @returns Size of layer
|
||||||
|
*/
|
||||||
virtual size_t size() const=0;
|
virtual size_t size() const=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||||
|
* @brief Abstract model of simple Network
|
||||||
|
*
|
||||||
|
*/
|
||||||
class Network
|
class Network
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Constructor for Network
|
||||||
|
* @param lam is parametr for many TransferFunctions
|
||||||
|
*/
|
||||||
inline Network(double lam):lambda(lam) {};
|
inline Network(double lam):lambda(lam) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Virtual destructor for Network
|
||||||
|
*/
|
||||||
virtual ~Network() {};
|
virtual ~Network() {};
|
||||||
|
|
||||||
virtual Solution solve(const Problem&)=0;
|
/**
|
||||||
|
* @brief This is a virtual function for all networks
|
||||||
|
* @param p is a Problem to be solved
|
||||||
|
* @returns Solution of Network for Problem
|
||||||
|
*/
|
||||||
|
virtual Solution solve(const Problem&p)=0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Getter of layer
|
||||||
|
* @param layer is position fo layer
|
||||||
|
* @returns Retruns specified layer
|
||||||
|
*/
|
||||||
virtual Layer& operator[](const size_t &layer)=0;
|
virtual Layer& operator[](const size_t &layer)=0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns parametr for TransferFunctions
|
||||||
|
* @returns lambda (parametr for TransferFunctions)
|
||||||
|
*/
|
||||||
inline float getLambda() const {return lambda;}
|
inline float getLambda() const {return lambda;}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param t is number of threads, if set to 0 or 1 then threading is disabled
|
||||||
|
* @brief Enables or disables Threaded computing of ANN
|
||||||
|
*/
|
||||||
|
|
||||||
inline virtual void setThreads(const unsigned&t) final {threads=t;}
|
inline virtual void setThreads(const unsigned&t) final {threads=t;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Parametr for TransferFunctions
|
||||||
|
*/
|
||||||
float lambda;
|
float lambda;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of threads used by network
|
||||||
|
*/
|
||||||
unsigned threads=1;
|
unsigned threads=1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||||
|
* @brief Abstract class for all Acyclic networks
|
||||||
|
*/
|
||||||
|
|
||||||
class ACyclicNetwork : public Network
|
class ACyclicNetwork : public Network
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Constructor for Acyclic network
|
||||||
|
* @param lam is parametr for many TransferFunctions
|
||||||
|
*/
|
||||||
inline ACyclicNetwork(double lam):Network(lam) {};
|
inline ACyclicNetwork(double lam):Network(lam) {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns size of ANN in layer
|
||||||
|
* @returns Return number of layer in network
|
||||||
|
*/
|
||||||
virtual size_t size() const=0;
|
virtual size_t size() const=0;
|
||||||
protected:
|
protected:
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user