#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 &) 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; }; } } } }