Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-constraints
Commits
39322553
Commit
39322553
authored
Feb 04, 2022
by
Florent Lamiraux
Browse files
[DifferentiableFunction] define operator== in cc file.
parent
d08a1f07
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/hpp/constraints/differentiable-function.hh
View file @
39322553
...
...
@@ -175,18 +175,8 @@ namespace hpp {
DevicePtr_t
robot
=
DevicePtr_t
(),
value_type
eps
=
std
::
sqrt
(
Eigen
::
NumTraits
<
value_type
>::
epsilon
()))
const
;
inline
bool
operator
==
(
DifferentiableFunction
const
&
other
)
const
{
try
{
return
isEqual
(
other
)
&&
other
.
isEqual
(
*
this
);
}
catch
(
const
std
::
bad_cast
&
exc
)
{
return
false
;
}
}
inline
bool
operator
!=
(
DifferentiableFunction
const
&
b
)
const
{
return
!
(
*
this
==
b
);
}
bool
operator
==
(
DifferentiableFunction
const
&
other
)
const
;
bool
operator
!=
(
DifferentiableFunction
const
&
b
)
const
;
//virtual bool isEqual(DifferentiableFunctionPtr_t const &, bool) const {return true;}
protected:
/// \brief Concrete class constructor should call this constructor.
...
...
src/differentiable-function.cc
View file @
39322553
...
...
@@ -204,6 +204,21 @@ namespace hpp {
finiteDiffCentral
(
jacobian
,
x
,
FiniteDiffVectorSpaceOp
(
eps
),
*
this
);
}
bool
DifferentiableFunction
::
operator
==
(
DifferentiableFunction
const
&
other
)
const
{
try
{
return
isEqual
(
other
)
&&
other
.
isEqual
(
*
this
);
}
catch
(
const
std
::
bad_cast
&
exc
)
{
return
false
;
}
}
bool
DifferentiableFunction
::
operator
!=
(
DifferentiableFunction
const
&
b
)
const
{
return
!
(
*
this
==
b
);
}
DifferentiableFunction
::
DifferentiableFunction
(
size_type
sizeInput
,
size_type
sizeInputDerivative
,
size_type
sizeOutput
,
std
::
string
name
)
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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