My attempt was just to copy the ParametersConstant class and add another input for time3 in the Integral function so that there are two time domains (and called it ParametersPWConstant).
My problem is that the compiler keeps thinking ParametersPWConstant is an abstract class. As I understand, an abstract class becomes concrete once all its undefined functions are defined. Having done so, I still don't understand why the class is still coming up as abstract.
Thanks for your help.
class ParametersPWConstant : public ParametersInner
virtual ParametersInner* clone() const;
virtual double Integral(
double time3) const;
virtual double IntegralSquare(
double time2) const;
Constant = constant;
ConstantDoubled = 2*constant;
ConstantSquare = constant*constant;
ParametersInner* ParametersPWConstant::clone() const
return new ParametersPWConstant(*this);
double ParametersPWConstant::Integral(double time1, double time2, double time3) const
return (time2 - time1)*Constant + (time3 - time1)*ConstantDoubled;
double ParametersPWConstant::IntegralSquare(double time1, double time2) const
return (time2 - time1)*ConstantSquare;