initial documentation
This commit is contained in:
5
Makefile
5
Makefile
@@ -49,6 +49,9 @@ lib/Genetics.a: ./src/Genetics/Genetics.a
|
||||
genetics_build:
|
||||
@make -C src/Genetics
|
||||
|
||||
documentation:
|
||||
doxygen
|
||||
|
||||
clean:
|
||||
@make -C src/MachineLearning clean
|
||||
@make -C src/Genetics clean
|
||||
@@ -56,4 +59,4 @@ clean:
|
||||
@make -C tests clean
|
||||
#@rm -f ./*.so ./*.a ./*.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 "Neuron.h"
|
||||
|
||||
|
||||
namespace Shin
|
||||
{
|
||||
namespace NeuralNetwork
|
||||
{
|
||||
/**
|
||||
* @brief Default value for lambda
|
||||
*/
|
||||
const float lambda=0.8;
|
||||
|
||||
/**
|
||||
* @author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||
* @brief Abstract class for all Layers of neurons
|
||||
*/
|
||||
|
||||
class Layer
|
||||
{
|
||||
public:
|
||||
|
||||
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;
|
||||
/**
|
||||
* @returns Size of layer
|
||||
*/
|
||||
virtual size_t size() const=0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||
* @brief Abstract model of simple Network
|
||||
*
|
||||
*/
|
||||
class Network
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor for Network
|
||||
* @param lam is parametr for many TransferFunctions
|
||||
*/
|
||||
inline Network(double lam):lambda(lam) {};
|
||||
|
||||
/**
|
||||
* @brief Virtual destructor for 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;
|
||||
|
||||
/**
|
||||
* @brief Returns parametr for TransferFunctions
|
||||
* @returns lambda (parametr for TransferFunctions)
|
||||
*/
|
||||
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;}
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* @brief Parametr for TransferFunctions
|
||||
*/
|
||||
float lambda;
|
||||
|
||||
/**
|
||||
* @brief Number of threads used by network
|
||||
*/
|
||||
unsigned threads=1;
|
||||
};
|
||||
|
||||
/**
|
||||
* @author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||
* @brief Abstract class for all Acyclic networks
|
||||
*/
|
||||
|
||||
class ACyclicNetwork : public Network
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief Constructor for Acyclic network
|
||||
* @param lam is parametr for many TransferFunctions
|
||||
*/
|
||||
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;
|
||||
protected:
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user