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
95bce7a1
Commit
95bce7a1
authored
Feb 03, 2018
by
Davis King
Browse files
Added probability_that_sequence_is_increasing() to python API
parent
7481ef1e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
tools/python/src/other.cpp
tools/python/src/other.cpp
+12
-0
No files found.
tools/python/src/other.cpp
View file @
95bce7a1
...
...
@@ -100,6 +100,16 @@ size_t py_count_steps_without_decrease_robust (
// ----------------------------------------------------------------------------------------
double
probability_that_sequence_is_increasing
(
py
::
object
arr
)
{
DLIB_CASSERT
(
len
(
arr
)
>
2
);
return
probability_gradient_greater_than
(
python_list_to_vector
<
double
>
(
arr
),
0
);
}
// ----------------------------------------------------------------------------------------
void
hit_enter_to_continue
()
{
std
::
cout
<<
"Hit enter to continue"
;
...
...
@@ -251,5 +261,7 @@ ensures \n\
!*/
);
m
.
def
(
"probability_that_sequence_is_increasing"
,
probability_that_sequence_is_increasing
,
py
::
arg
(
"time_series"
),
"returns the probability that the given sequence of real numbers is increasing in value over time."
);
}
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