Commit fda92d32 authored by Vaios Papaspyros's avatar Vaios Papaspyros
Browse files

gp_parego.hpp: fixed the failed assertion issues due to different sample and observation sizes

parent 1c9648ee
......@@ -41,13 +41,18 @@ namespace limbo {
const Eigen::VectorXd& noises_bl = Eigen::VectorXd())
{
_raw_observations = observations;
_nb_objs = observations[0].size();
auto new_observations = _scalarize_obs(observations);
Model::compute(samples, new_observations, noises, bl_samples);
}
/// add sample will NOT be incremental (we call compute each time)
void add_sample(const Eigen::VectorXd& sample, const Eigen::VectorXd& observation, double noise)
{
this->_samples.push_back(sample);
this->_noises.conservativeResize(this->_noises.size() + 1);
this->_noises[this->_noises.size() - 1] = noise;
_raw_observations.push_back(observation);
this->compute(this->_samples,
_raw_observations, this->_noises,
this->_bl_samples);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment