Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
6c66d22b
Commit
6c66d22b
authored
Oct 03, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made find_upper_quantile() more general
parent
5fe0a5f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
running_gradient.h
dlib/statistics/running_gradient.h
+5
-1
running_gradient_abstract.h
dlib/statistics/running_gradient_abstract.h
+1
-1
No files found.
dlib/statistics/running_gradient.h
View file @
6c66d22b
...
...
@@ -222,11 +222,15 @@ namespace dlib
typename
T
>
double
find_upper_quantile
(
T
container
,
const
T
&
container_
,
double
quantile
)
{
DLIB_CASSERT
(
0
<=
quantile
&&
quantile
<=
1
.
0
);
// copy container into a std::vector
std
::
vector
<
double
>
container
(
container_
.
begin
(),
container_
.
end
());
DLIB_CASSERT
(
container
.
size
()
>
0
);
size_t
idx_upper
=
std
::
round
((
container
.
size
()
-
1
)
*
(
1
-
quantile
));
...
...
dlib/statistics/running_gradient_abstract.h
View file @
6c66d22b
...
...
@@ -251,7 +251,7 @@ namespace dlib
typename
T
>
double
find_upper_quantile
(
T
container
,
const
T
&
container
,
double
quantile
);
/*!
...
...
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