Files
NeuralNetworkLib/include/NeuralNetwork/ConstructiveAlgorithms/CelularEncoding/Instruction/Other.h
2016-05-18 22:57:06 +02:00

34 lines
754 B
C++

#pragma once
#include "./Instruction.h"
#include "../Cell.h"
#include "../CelularEncoding.h"
namespace NeuralNetworks {
namespace ConstructiveAlgorithms {
namespace CelularEncoding {
namespace Instruction{
class Wait : public Instruction{
public:
Wait(bool terminal = false) : _numberOfNodes(terminal? 0 : 1) {
}
virtual void run(Cell &cell, CelularEncoding &, const std::vector<double> &) override {
cell.setCodePointer(cell.getCodePointer()->c1);
}
virtual std::size_t numberOfNodes() const override {
return _numberOfNodes;
}
virtual std::string toString() const override {
return "Wait";
}
protected:
std::size_t _numberOfNodes;
};
}
}
}
}