diff --git a/arm/arm.hpp b/arm/arm.hpp index 39a2a7e..f314a4b 100644 --- a/arm/arm.hpp +++ b/arm/arm.hpp @@ -8,21 +8,9 @@ namespace bandit{ class Arm{ public: //base functions should not be called - virtual double pull(){ - std::cout << "unexpected base Arm::pull function call" << std::endl; - abort(); - return 0; - } - virtual double getExpectedReward(){ - std::cout << "unexpected base Arm::getExpectedReward function call" << std::endl; - abort(); - return 0; - } - virtual std::string toString(){ - std::cout << "unexpected base Arm::toString function call" << std::endl; - abort(); - return ""; - } + virtual double pull() = 0; + virtual double getExpectedReward() = 0; + virtual std::string toString() = 0; }; } //namespace diff --git a/policy/policy.hpp b/policy/policy.hpp index a917689..07c64e2 100644 --- a/policy/policy.hpp +++ b/policy/policy.hpp @@ -9,20 +9,9 @@ namespace bandit{ class Policy{ public: //base functions should not be called - virtual int selectNextArm(){ - std::cout << "unexpected base Policy::selectNextArm function call" << std::endl; - abort(); - return -1; - } - virtual void updateState(int, double){ - std::cout << "unexpected base Policy::updateState function call" << std::endl; - abort(); - } - virtual std::string toString(){ - std::cout << "unexpected base Policy::toString function call" << std::endl; - abort(); - return ""; - } + virtual int selectNextArm() = 0; + virtual void updateState(int, double) = 0; + virtual std::string toString() = 0; }; } //namespace