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
alta
alta
Commits
4513913d
Commit
4513913d
authored
Oct 31, 2013
by
Laurent Belcour
Browse files
Changing the min/max functions in parametrized class
parent
7aa9ac47
Changes
13
Hide whitespace changes
Inline
Side-by-side
sources/core/data.h
View file @
4513913d
...
...
@@ -155,21 +155,9 @@ class data_params : public data
return
_data
.
size
();
}
// Get min and max input space values
virtual
vec
min
()
const
{
return
_min
;
}
virtual
vec
max
()
const
{
return
_max
;
}
protected:
// data
data_params
::
clustrering
_clustering_method
;
std
::
vector
<
vec
>
_data
;
vec
_min
,
_max
;
};
sources/core/params.cpp
View file @
4513913d
...
...
@@ -373,11 +373,11 @@ void parametrized::setMax(const vec& max)
#endif
_max
=
max
;
}
vec
parametrized
::
getM
in
()
const
vec
parametrized
::
m
in
()
const
{
return
_min
;
}
vec
parametrized
::
getM
ax
()
const
vec
parametrized
::
m
ax
()
const
{
return
_max
;
}
sources/core/params.h
View file @
4513913d
...
...
@@ -360,10 +360,10 @@ class parametrized
virtual
void
setMax
(
const
vec
&
max
)
;
//! \brief Get the minimum value the input can take
virtual
vec
getM
in
()
const
;
virtual
vec
m
in
()
const
;
//! \brief Get the maximum value the input can take
virtual
vec
getM
ax
()
const
;
virtual
vec
m
ax
()
const
;
protected:
...
...
sources/core/rational_function.cpp
View file @
4513913d
...
...
@@ -328,8 +328,8 @@ rational_function_1d* rational_function::get(int i)
// Test if the input domain is not empty. If one dimension of
// the input domain is a point, I manually inflate this dimension
// to avoid numerical issues.
vec
_min
=
getM
in
();
vec
_max
=
getM
ax
();
vec
_min
=
m
in
();
vec
_max
=
m
ax
();
for
(
int
k
=
0
;
k
<
dimX
();
++
k
)
{
if
(
_min
[
k
]
==
_max
[
k
])
...
...
sources/core/vertical_segment.cpp
View file @
4513913d
...
...
@@ -235,13 +235,3 @@ int vertical_segment::size() const
{
return
_data
.
size
()
;
}
vec
vertical_segment
::
min
()
const
{
return
_min
;
}
vec
vertical_segment
::
max
()
const
{
return
_max
;
}
sources/core/vertical_segment.h
View file @
4513913d
...
...
@@ -57,19 +57,10 @@ class vertical_segment : public data
// Get data size
virtual
int
size
()
const
;
// Get min and max input parameters
virtual
vec
min
()
const
;
virtual
vec
max
()
const
;
private:
// data
// Store for each point of data, the upper
// and lower value
std
::
vector
<
vec
>
_data
;
// Store the min and max value on the input
// domain
vec
_min
,
_max
;
}
;
sources/plugins/data_interpolant/data.cpp
View file @
4513913d
...
...
@@ -26,8 +26,8 @@ void data_interpolant::load(const std::string& filename)
// Copy the informations
setDimX
(
_data
->
dimX
());
setDimY
(
_data
->
dimY
());
setMin
(
_data
->
getM
in
());
setMax
(
_data
->
getM
ax
());
setMin
(
_data
->
m
in
());
setMax
(
_data
->
m
ax
());
// Update the KDtreee by inserting all points
for
(
int
i
=
0
;
i
<
_data
->
size
();
++
i
)
...
...
sources/plugins/nonlinear_fitter_ceres/fitter.cpp
View file @
4513913d
...
...
@@ -176,8 +176,8 @@ bool nonlinear_fitter_ceres::fit_data(const data* d, function* fit, const argume
// to the dimension of my fitting problem
fit
->
setDimX
(
d
->
dimX
())
;
fit
->
setDimY
(
d
->
dimY
())
;
fit
->
setMin
(
d
->
getM
in
())
;
fit
->
setMax
(
d
->
getM
ax
())
;
fit
->
setMin
(
d
->
m
in
())
;
fit
->
setMax
(
d
->
m
ax
())
;
// Convert the function and bootstrap it with the data
if
(
dynamic_cast
<
nonlinear_function
*>
(
fit
)
==
NULL
)
...
...
sources/plugins/nonlinear_fitter_eigen/fitter.cpp
View file @
4513913d
...
...
@@ -273,8 +273,8 @@ bool nonlinear_fitter_eigen::fit_data(const data* d, function* fit, const argume
// to the dimension of my fitting problem
fit
->
setDimX
(
d
->
dimX
())
;
fit
->
setDimY
(
d
->
dimY
())
;
fit
->
setMin
(
d
->
getM
in
())
;
fit
->
setMax
(
d
->
getM
ax
())
;
fit
->
setMin
(
d
->
m
in
())
;
fit
->
setMax
(
d
->
m
ax
())
;
// Convert the function and bootstrap it with the data
if
(
dynamic_cast
<
nonlinear_function
*>
(
fit
)
==
NULL
)
...
...
sources/plugins/nonlinear_fitter_ipopt/fitter.cpp
View file @
4513913d
...
...
@@ -218,8 +218,8 @@ bool nonlinear_fitter_ipopt::fit_data(const data* d, function* fit, const argume
// to the dimension of my fitting problem
fit
->
setDimX
(
d
->
dimX
())
;
fit
->
setDimY
(
d
->
dimY
())
;
fit
->
setMin
(
d
->
getM
in
())
;
fit
->
setMax
(
d
->
getM
ax
())
;
fit
->
setMin
(
d
->
m
in
())
;
fit
->
setMax
(
d
->
m
ax
())
;
// Convert the function and bootstrap it with the data
if
(
dynamic_cast
<
nonlinear_function
*>
(
fit
)
==
NULL
)
...
...
sources/plugins/nonlinear_fitter_nlopt/fitter.cpp
View file @
4513913d
...
...
@@ -122,8 +122,8 @@ bool nonlinear_fitter_nlopt::fit_data(const data* d, function* fit, const argume
// to the dimension of my fitting problem
fit
->
setDimX
(
d
->
dimX
())
;
fit
->
setDimY
(
d
->
dimY
())
;
fit
->
setMin
(
d
->
getM
in
())
;
fit
->
setMax
(
d
->
getM
ax
())
;
fit
->
setMin
(
d
->
m
in
())
;
fit
->
setMax
(
d
->
m
ax
())
;
// Convert the function and bootstrap it with the data
if
(
dynamic_cast
<
nonlinear_function
*>
(
fit
)
==
NULL
)
...
...
sources/plugins/rational_function_chebychev/rational_function.cpp
View file @
4513913d
...
...
@@ -99,8 +99,8 @@ rational_function_1d* rational_function_chebychev::get(int i)
// Test if the input domain is not empty. If one dimension of
// the input domain is a point, I manually inflate this dimension
// to avoid numerical issues.
vec
_min
=
getM
in
();
vec
_max
=
getM
ax
();
vec
_min
=
m
in
();
vec
_max
=
m
ax
();
for
(
int
k
=
0
;
k
<
dimX
();
++
k
)
{
if
(
_min
[
k
]
==
_max
[
k
])
...
...
sources/plugins/rational_function_legendre/rational_function.h
View file @
4513913d
...
...
@@ -54,8 +54,8 @@ class rational_function_legendre : public rational_function
// Test if the input domain is not empty. If one dimension of
// the input domain is a point, I manually inflate this dimension
// to avoid numerical issues.
vec
_min
=
getM
in
();
vec
_max
=
getM
ax
();
vec
_min
=
m
in
();
vec
_max
=
m
ax
();
for
(
int
k
=
0
;
k
<
dimX
();
++
k
)
{
if
(
_min
[
k
]
==
_max
[
k
])
...
...
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