Files
solver/MbDCode/Constant.cpp
2023-05-27 21:43:09 -06:00

27 lines
373 B
C++

#include "Constant.h"
using namespace MbD;
Constant::Constant()
{
}
Constant::Constant(double val) : Variable(val)
{
}
Symsptr Constant::differentiateWRT(Symsptr sptr, Symsptr var)
{
return std::make_shared<Constant>(0.0);
}
bool MbD::Constant::isConstant()
{
return true;
}
std::ostream& MbD::Constant::printOn(std::ostream& s) const
{
return s << this->value;
}