serializatioin / deserialization and tests

This commit is contained in:
2016-04-06 15:54:47 +02:00
parent adb6708b39
commit 17cbf5effe
28 changed files with 437 additions and 280 deletions

View File

@@ -1,14 +1,13 @@
#pragma once
#include "Neuron.h"
#include <SimpleJSON/SerializableObject.h>
#include <cstddef>
#include <vector>
#include "Neuron.h"
#include "Stringifiable.h"
#include <ostream>
#include <sstream>
#define NEURAL_NETWORK_INIT() const static bool ______TMP= NeuralNetwork::Network::loaded()
namespace NeuralNetwork
{
@@ -17,13 +16,15 @@ namespace NeuralNetwork
* @author Tomas Cernik (Tom.Cernik@gmail.com)
* @brief Abstract model of simple Network
*/
class Network : public Stringifiable
class Network : public SimpleJSON::SerializableObject
{
public:
/**
* @brief Constructor for Network
*/
inline Network() {};
inline Network() {
loaded();
};
/**
* @brief Virtual destructor for Network
@@ -49,5 +50,8 @@ namespace NeuralNetwork
* @brief Number of threads used by network
*/
unsigned threads=1;
public:
static bool loaded();
};
}