Commit df15b126 authored by Antoine Cully's avatar Antoine Cully
Browse files

Cland Format [ci skip]

parent bd207cc2
......@@ -83,10 +83,10 @@ namespace limbo {
assert(observations.size() != 0);
assert(samples.size() == observations.size());
if (_dim_in != samples[0].size()) {
_dim_in = samples[0].size();
_kernel_function = KernelFunction(_dim_in); // the cost of building a functor should be relatively low
}
if (_dim_in != samples[0].size()) {
_dim_in = samples[0].size();
_kernel_function = KernelFunction(_dim_in); // the cost of building a functor should be relatively low
}
if (_dim_out != observations[0].size()) {
_dim_out = observations[0].size();
......@@ -119,14 +119,14 @@ namespace limbo {
void add_sample(const Eigen::VectorXd& sample, const Eigen::VectorXd& observation, double noise)
{
if (_samples.empty()) {
if (_dim_in != sample.size()) {
_dim_in = sample.size();
_kernel_function = KernelFunction(_dim_in); // the cost of building a functor should be relatively low
}
if (_dim_out != observation.size()) {
_dim_out = observation.size();
_mean_function = MeanFunction(_dim_out); // the cost of building a functor should be relatively low
}
if (_dim_in != sample.size()) {
_dim_in = sample.size();
_kernel_function = KernelFunction(_dim_in); // the cost of building a functor should be relatively low
}
if (_dim_out != observation.size()) {
_dim_out = observation.size();
_mean_function = MeanFunction(_dim_out); // the cost of building a functor should be relatively low
}
}
else {
assert(sample.size() == _dim_in);
......
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