Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
df15b126
Commit
df15b126
authored
Oct 17, 2016
by
Antoine Cully
Browse files
Cland Format [ci skip]
parent
bd207cc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/limbo/model/gp.hpp
View file @
df15b126
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment