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
4485543e
Commit
4485543e
authored
Dec 01, 2017
by
Davis King
Browse files
Minor cleanup
parent
f3ec2abb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
17 deletions
+11
-17
dlib/disjoint_subsets.h
dlib/disjoint_subsets.h
+1
-0
dlib/disjoint_subsets/disjoint_subsets_sized_abstract.h
dlib/disjoint_subsets/disjoint_subsets_sized_abstract.h
+9
-7
dlib/disjoint_subsets_sized.h
dlib/disjoint_subsets_sized.h
+0
-9
dlib/test/disjoint_subsets_sized.cpp
dlib/test/disjoint_subsets_sized.cpp
+1
-1
No files found.
dlib/disjoint_subsets.h
View file @
4485543e
...
...
@@ -5,6 +5,7 @@
#include "disjoint_subsets/disjoint_subsets.h"
#include "disjoint_subsets/disjoint_subsets_sized.h"
#endif // DLIB_DISJOINt_SUBSETS_
...
...
dlib/disjoint_subsets/disjoint_subsets_sized_abstract.h
View file @
4485543e
...
...
@@ -11,7 +11,7 @@ namespace dlib
// ----------------------------------------------------------------------------------------
class
disjoint_subsets_sized
:
public
disjoint_subsets
class
disjoint_subsets_sized
{
/*!
INITIAL VALUE
...
...
@@ -22,11 +22,13 @@ namespace dlib
This object represents a set of integers which is partitioned into
a number of disjoint subsets. It supports the two fundamental operations
of finding which subset a particular integer belongs to as well as
merging subsets.
merging subsets. It also allows you to find out how big each subset is. It
is therefore essentially the same thing as dlib::disjoint_subsets, except
it also keeps track of of the size of each subset.
!*/
public:
virtual
void
clear
(
void
clear
(
)
noexcept
;
/*!
ensures
...
...
@@ -35,7 +37,7 @@ namespace dlib
- returns this object to its initial value
!*/
virtual
void
set_size
(
void
set_size
(
unsigned
long
new_size
);
/*!
...
...
@@ -48,7 +50,7 @@ namespace dlib
- #get_size_of_set(i) == 1
!*/
virtual
unsigned
long
size
(
unsigned
long
size
(
)
const
noexcept
;
/*!
ensures
...
...
@@ -56,7 +58,7 @@ namespace dlib
by this object.
!*/
virtual
unsigned
long
find_set
(
unsigned
long
find_set
(
unsigned
long
item
)
const
;
/*!
...
...
@@ -73,7 +75,7 @@ namespace dlib
have find_set(A) == find_set(B).
!*/
virtual
unsigned
long
merge_sets
(
unsigned
long
merge_sets
(
unsigned
long
a
,
unsigned
long
b
);
...
...
dlib/disjoint_subsets_sized.h
deleted
100644 → 0
View file @
f3ec2abb
// Copyright (C) 2011 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifndef DLIB_DISJOINt_SUBSETS_SIZED_
#define DLIB_DISJOINt_SUBSETS_SIZED_
#include "disjoint_subsets/disjoint_subsets_sized.h"
#endif // DLIB_DISJOINt_SUBSETS_SIZED_
dlib/test/disjoint_subsets_sized.cpp
View file @
4485543e
...
...
@@ -6,7 +6,7 @@
#include <string>
#include <cstdlib>
#include <ctime>
#include <dlib/disjoint_subsets
_sized
.h>
#include <dlib/disjoint_subsets.h>
#include "tester.h"
...
...
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