Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid (or not) default implementation of method MeasurementModel::getNoiseCovarianceMatrix #75

Open
xEnVrE opened this issue May 24, 2019 · 1 comment

Comments

@xEnVrE
Copy link
Collaborator

xEnVrE commented May 24, 2019

At the moment, there is a default implementation of the virtual method MeasurementModel::getNoiseCovarianceMatrix() const

std::pair<bool, MatrixXd> MeasurementModel::getNoiseCovarianceMatrix() const
{
return std::make_pair(false, MatrixXd::Zero(1, 1));
}

If a user implements that method, in a inheriting class, without using the keywords const and override, the internal machinery of the library will silently call the default method possibly causing erroneous behaviors. Should we change this to something different, e.g. throwing an exception in the default implementation?

@claudiofantacci

@claudiofantacci
Copy link
Collaborator

I don't like this as well.
We should just throw an exception here and in similar contexts.

@claudiofantacci claudiofantacci added this to the 0.9.0 milestone May 27, 2019
@xEnVrE xEnVrE removed this from the 0.9.0 milestone Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants