Class KModelContinuousStates#
Defined in File KModel.h
Inheritance Relationships#
Base Type#
public Karana::Core::Base(Class Base)
Derived Type#
public Karana::Models::NoContinuousStates(Class NoContinuousStates)
Class Documentation#
-
class KModelContinuousStates : public Karana::Core::Base#
A base class for continuous model states. Derive from this and add any continuous states for your model.
Override the isFinalized method to check whether the continuous states are set. Override the setX and getX to set and get the model continuous states. Whenever the number of continuous states changes (the length of the vector from getX changes), you MUST re-register the model. Neglecting to do so leads to undefined behavior. See the Continuous states section for more discussion about the KModel class.
Subclassed by Karana::Models::NoContinuousStates
Public Functions
-
inline KModelContinuousStates(std::string_view name)#
Constructor.
- Parameters:
name – the continuous model states
-
inline virtual bool isFinalized() const override#
Checks is the params for the object have been initialized.
- Returns:
True if the params have set up.
-
virtual const Eigen::Ref<const km::Vec> getX() const = 0#
Get the continuous model states.
- Returns:
The continuous model states.
-
virtual const Eigen::Ref<const km::Vec> getdX() = 0#
Get the derivative of the continuous model states.
- Returns:
The continuous model states’ derivatives.
-
virtual void setX(const Eigen::Ref<const km::Vec> x) = 0#
Set the continuous model states.
- Parameters:
x – The new continuous model states.
-
inline KModelContinuousStates(std::string_view name)#