Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
67ae00b4
Commit
67ae00b4
authored
May 24, 2013
by
Davis King
Browse files
Added missing assert
parent
37d17745
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
dlib/numerical_integration/integrate_function_adapt_simpson.h
.../numerical_integration/integrate_function_adapt_simpson.h
+10
-0
No files found.
dlib/numerical_integration/integrate_function_adapt_simpson.h
View file @
67ae00b4
...
...
@@ -4,6 +4,7 @@
#define DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSON__
#include "integrate_function_adapt_simpson_abstract.h"
#include "../assert.h"
// ----------------------------------------------------------------------------------------
...
...
@@ -51,6 +52,15 @@ namespace dlib
T
tol
=
1e-10
)
{
// make sure requires clause is not broken
DLIB_ASSERT
(
b
>
a
&&
tol
>
0
,
"
\t
T integrate_function_adapt_simp()"
<<
"
\n\t
Invalid arguments were given to this function."
<<
"
\n\t
a: "
<<
a
<<
"
\n\t
b: "
<<
b
<<
"
\n\t
tol: "
<<
tol
);
T
eps
=
std
::
numeric_limits
<
T
>::
epsilon
();
if
(
tol
<
eps
)
{
...
...
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