#pragma once #include #include #include "Neuron.h" #include "Stringifiable.h" #include #include namespace NeuralNetwork { /** * @author Tomas Cernik (Tom.Cernik@gmail.com) * @brief Abstract model of simple Network */ class Network : public Stringifiable { public: /** * @brief Constructor for Network */ inline Network() {}; /** * @brief Virtual destructor for Network */ virtual ~Network() {}; /** * @brief This is a virtual function for all networks * @param input is input of network * @returns output of network */ virtual std::vector computeOutput(const std::vector& input)=0; /** * @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;} using Stringifiable::stringify; protected: /** * @brief Number of threads used by network */ unsigned threads=1; }; }