use abstract methods in optimizer base class

use syntax

virtual void run() = 0;

rather than

virtual void run() { throw runtime_error("not implemented"); }