Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias Mayr
limbo
Commits
d650f746
Commit
d650f746
authored
Mar 23, 2018
by
Konstantinos Chatzilygeroudis
Browse files
Remove compilation issues [ci skip]
parent
e1bf1f65
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/benchmarks/limbo/testfunctions.hpp
View file @
d650f746
...
...
@@ -102,7 +102,7 @@ inline double c2(double x)
inline
vec_t
t_osz
(
const
vec_t
&
x
)
{
vec_t
r
=
x
;
for
(
in
t
i
=
0
;
i
<
x
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
static_cast
<
size_t
>
(
x
.
size
()
)
;
i
++
)
r
(
i
)
=
sign
(
x
(
i
))
*
std
::
exp
(
hat
(
x
(
i
))
+
0.049
*
std
::
sin
(
c1
(
x
(
i
))
*
hat
(
x
(
i
)))
+
std
::
sin
(
c2
(
x
(
i
))
*
hat
(
x
(
i
))));
return
r
;
}
...
...
@@ -161,7 +161,7 @@ struct Rastrigin {
double
operator
()(
const
vec_t
&
xx
)
const
{
vec_t
x
=
xx
;
for
(
in
t
i
=
0
;
i
<
x
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
static_cast
<
size_t
>
(
x
.
size
()
)
;
i
++
)
x
(
i
)
=
2.
*
xx
(
i
)
-
1.
;
double
f
=
10.
*
dim_in
();
for
(
size_t
i
=
0
;
i
<
dim_in
();
++
i
)
...
...
@@ -176,7 +176,7 @@ struct Rastrigin {
#else
mat_t
sols
=
boost
::
numeric
::
ublas
::
zero_matrix
<
double
>
(
1
,
4
);
#endif
for
(
in
t
i
=
0
;
i
<
4
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
4
;
i
++
)
sols
(
0
,
i
)
=
(
sols
(
0
,
i
)
+
1.
)
/
2.
;
return
sols
;
}
...
...
@@ -203,7 +203,7 @@ struct Hartmann3 {
alpha
ASSIGNMENT_OP
1.0
,
1.2
,
3.0
,
3.2
;
double
res
=
0.
;
for
(
in
t
i
=
0
;
i
<
4
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
4
;
i
++
)
{
double
s
=
0.
;
for
(
size_t
j
=
0
;
j
<
3
;
j
++
)
{
s
+=
a
(
i
,
j
)
*
sqr
(
x
(
j
)
-
p
(
i
,
j
));
...
...
@@ -243,7 +243,7 @@ struct Hartmann6 {
alpha
ASSIGNMENT_OP
1.0
,
1.2
,
3.0
,
3.2
;
double
res
=
0.
;
for
(
in
t
i
=
0
;
i
<
4
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
4
;
i
++
)
{
double
s
=
0.
;
for
(
size_t
j
=
0
;
j
<
6
;
j
++
)
{
s
+=
a
(
i
,
j
)
*
sqr
(
x
(
j
)
-
p
(
i
,
j
));
...
...
@@ -270,7 +270,7 @@ struct GoldsteinPrice {
double
operator
()(
const
vec_t
&
xx
)
const
{
vec_t
x
=
xx
;
for
(
in
t
i
=
0
;
i
<
x
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
static_cast
<
size_t
>
(
x
.
size
()
)
;
i
++
)
x
(
i
)
=
4.
*
xx
(
i
)
-
2.
;
double
fact1a
=
sqr
(
x
(
0
)
+
x
(
1
)
+
1.
);
...
...
Write
Preview
Markdown
is supported
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