123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #pragma once
- #include <Mathematics/OdeSolver.h>
- namespace WwiseGTE
- {
- template <typename Real, typename TVector>
- class OdeEuler : public OdeSolver<Real, TVector>
- {
- public:
-
- virtual ~OdeEuler() = default;
- OdeEuler(Real tDelta, std::function<TVector(Real, TVector const&)> const& F)
- :
- OdeSolver<Real, TVector>(tDelta, F)
- {
- }
-
-
- virtual void Update(Real tIn, TVector const& xIn, Real& tOut, TVector& xOut) override
- {
- TVector fVector = this->mFunction(tIn, xIn);
- tOut = tIn + this->mTDelta;
- xOut = xIn + this->mTDelta * fVector;
- }
- };
- }
|