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
85441f3f
Commit
85441f3f
authored
Nov 04, 2012
by
Davis King
Browse files
Fixed a minor bug
parent
1727efea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
dlib/clustering/chinese_whispers.h
dlib/clustering/chinese_whispers.h
+3
-0
dlib/clustering/modularity_clustering.h
dlib/clustering/modularity_clustering.h
+4
-0
No files found.
dlib/clustering/chinese_whispers.h
View file @
85441f3f
...
@@ -26,6 +26,9 @@ namespace dlib
...
@@ -26,6 +26,9 @@ namespace dlib
<<
"
\n\t
Invalid inputs were given to this function"
<<
"
\n\t
Invalid inputs were given to this function"
);
);
labels
.
clear
();
if
(
edges
.
size
()
==
0
)
return
0
;
std
::
vector
<
std
::
pair
<
unsigned
long
,
unsigned
long
>
>
neighbors
;
std
::
vector
<
std
::
pair
<
unsigned
long
,
unsigned
long
>
>
neighbors
;
find_neighbor_ranges
(
edges
,
neighbors
);
find_neighbor_ranges
(
edges
,
neighbors
);
...
...
dlib/clustering/modularity_clustering.h
View file @
85441f3f
...
@@ -308,6 +308,10 @@ namespace dlib
...
@@ -308,6 +308,10 @@ namespace dlib
<<
"
\n\t
Invalid inputs were given to this function"
<<
"
\n\t
Invalid inputs were given to this function"
);
);
labels
.
clear
();
if
(
edges
.
size
()
==
0
)
return
0
;
const
unsigned
long
num_nodes
=
max_index_plus_one
(
edges
);
const
unsigned
long
num_nodes
=
max_index_plus_one
(
edges
);
// compute the node_degrees vector, edge_sum value, and diag(B).
// compute the node_degrees vector, edge_sum value, and diag(B).
...
...
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