Implement Power function

This commit is contained in:
Aik-Siong Koh
2025-08-07 20:37:33 -06:00
committed by Chris Hennes
parent 09d6175a2b
commit 1a8fdc32d3
27 changed files with 220 additions and 44 deletions

View File

@@ -6,9 +6,12 @@
using namespace MbD;
MbD::RampStepFunction::RampStepFunction(Symsptr arg) : PiecewiseFunction(arg)
{
}
MbD::RampStepFunction::RampStepFunction(Symsptr var, std::shared_ptr<std::vector<double>> consts, std::shared_ptr<std::vector<double>> trans)
{
double x0 = trans->at(0);
double x1 = trans->at(1);
double y0 = consts->at(0);
@@ -60,3 +63,8 @@ void MbD::RampStepFunction::initFunctionsTransitions(Symsptr var, double x0, dou
transitions->push_back(symx0);
transitions->push_back(symx1);
}
Symsptr MbD::RampStepFunction::copyWith(Symsptr arg)
{
return std::make_shared<RampStepFunction>(arg);
}