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
aac2ea60
Commit
aac2ea60
authored
12 years ago
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified spec and added more tests.
parent
31e6568f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
min_cut_abstract.h
dlib/graph_cuts/min_cut_abstract.h
+1
-1
graph_cuts.cpp
dlib/test/graph_cuts.cpp
+14
-0
No files found.
dlib/graph_cuts/min_cut_abstract.h
View file @
aac2ea60
...
...
@@ -429,7 +429,7 @@ namespace dlib
- #g.get_flow(i,j) == the residual flow capacity left after the max
possible amount of flow is passing from the source node to the sink
node. For example, this means that #g.get_flow(i,j) == 0 whenever
node i
and j are in different cuts.
node i
is in the SOURCE_CUT and j is in the SINK_CUT.
- #g.get_flow(i,j) >= 0
!*/
...
...
This diff is collapsed.
Click to expand it.
dlib/test/graph_cuts.cpp
View file @
aac2ea60
...
...
@@ -756,6 +756,20 @@ namespace
print_graph
(
g1
);
// make sure the flow residuals are 0 at the cut locations
for
(
unsigned
long
i
=
0
;
i
<
g1
.
number_of_nodes
();
++
i
)
{
for
(
unsigned
long
j
=
0
;
j
<
g1
.
node
(
i
).
number_of_children
();
++
j
)
{
if
((
g1
.
node
(
i
).
data
==
SOURCE_CUT
&&
g1
.
node
(
i
).
child
(
j
).
data
!=
SOURCE_CUT
)
||
(
g1
.
node
(
i
).
data
!=
SINK_CUT
&&
g1
.
node
(
i
).
child
(
j
).
data
==
SINK_CUT
)
)
{
DLIB_TEST_MSG
(
g1
.
node
(
i
).
child_edge
(
j
)
==
0
,
g1
.
node
(
i
).
child_edge
(
j
));
}
}
}
// copy the edge weights from g2 back to g1 so we can compute cut scores
copy_edge_weights
(
g1
,
g2
);
...
...
This diff is collapsed.
Click to expand it.
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