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
Guilhem Saurel
ndcurves
Commits
f389bd2e
Commit
f389bd2e
authored
Dec 04, 2019
by
Pierre Fernbach
Browse files
add operator == in Bernstein struct
parent
c80dd0c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/curves/bernstein.h
View file @
f389bd2e
...
...
@@ -45,6 +45,17 @@ struct Bern {
return
bin_m_i_
*
(
pow
(
u
,
i_
))
*
pow
((
1
-
u
),
m_minus_i
);
}
virtual
bool
operator
==
(
const
Bern
&
other
)
const
{
return
m_minus_i
==
other
.
m_minus_i
&&
i_
==
other
.
i_
&&
bin_m_i_
==
other
.
bin_m_i_
;
}
virtual
bool
operator
!=
(
const
Bern
&
other
)
const
{
return
!
(
*
this
==
other
);
}
/* Attributes */
Numeric
m_minus_i
;
Numeric
i_
;
...
...
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