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
3b4a2308
"git@developer.sourcefind.cn:OpenDAS/nerfacc.git" did not exist on "264cf468454878ff2682b0cd171ae15985127443"
Commit
3b4a2308
authored
May 21, 2012
by
Davis King
Browse files
Clarified spec regarding infinite factor potentials and flow capacities.
parent
1bcab299
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
dlib/graph_cuts/find_max_factor_graph_potts_abstract.h
dlib/graph_cuts/find_max_factor_graph_potts_abstract.h
+8
-0
dlib/graph_cuts/min_cut_abstract.h
dlib/graph_cuts/min_cut_abstract.h
+8
-3
No files found.
dlib/graph_cuts/find_max_factor_graph_potts_abstract.h
View file @
3b4a2308
...
@@ -138,6 +138,9 @@ namespace dlib
...
@@ -138,6 +138,9 @@ namespace dlib
node the label of true. The larger the value, the more desirable it is
node the label of true. The larger the value, the more desirable it is
to give it this label. Similarly, a negative value indicates that it is
to give it this label. Similarly, a negative value indicates that it is
better to give the node a label of false.
better to give the node a label of false.
- It is valid for the returned value to be positive or negative infinity.
A value of positive infinity indicates that the idx-th node must be labeled
true while negative infinity means it must be labeled false.
!*/
!*/
value_type
factor_value_disagreement
(
value_type
factor_value_disagreement
(
...
@@ -156,6 +159,7 @@ namespace dlib
...
@@ -156,6 +159,7 @@ namespace dlib
different labels. Larger values indicate a larger penalty.
different labels. Larger values indicate a larger penalty.
- this function is symmetric. That is, it is true that:
- this function is symmetric. That is, it is true that:
factor_value_disagreement(i,j) == factor_value_disagreement(j,i)
factor_value_disagreement(i,j) == factor_value_disagreement(j,i)
- The return value should be a finite value.
!*/
!*/
};
};
...
@@ -218,6 +222,9 @@ namespace dlib
...
@@ -218,6 +222,9 @@ namespace dlib
node the label of true. The larger the value, the more desirable it is
node the label of true. The larger the value, the more desirable it is
to give it this label. Similarly, a negative value indicates that it is
to give it this label. Similarly, a negative value indicates that it is
better to give the node a label of false.
better to give the node a label of false.
- It is valid for the returned value to be positive or negative infinity.
A value of positive infinity indicates that the idx-th node must be labeled
true while negative infinity means it must be labeled false.
!*/
!*/
value_type
factor_value_disagreement
(
value_type
factor_value_disagreement
(
...
@@ -241,6 +248,7 @@ namespace dlib
...
@@ -241,6 +248,7 @@ namespace dlib
different labels. Larger values indicate a larger penalty.
different labels. Larger values indicate a larger penalty.
- this function is symmetric. That is, it is true that:
- this function is symmetric. That is, it is true that:
factor_value_disagreement(i,j) == factor_value_disagreement(j,i)
factor_value_disagreement(i,j) == factor_value_disagreement(j,i)
- The return value should be a finite value.
!*/
!*/
};
};
...
...
dlib/graph_cuts/min_cut_abstract.h
View file @
3b4a2308
...
@@ -268,8 +268,9 @@ namespace dlib
...
@@ -268,8 +268,9 @@ namespace dlib
- idx2 < number_of_nodes()
- idx2 < number_of_nodes()
- idx1 and idx2 are neighbors in the graph
- idx1 and idx2 are neighbors in the graph
ensures
ensures
- returns the residual flow capacity from the idx1-th
- returns the residual flow capacity from the idx1-th node to the idx2-th node.
node to the idx2-th node.
- It is valid for this function to return a floating point value of infinity.
This value means this edge has an unlimited capacity.
!*/
!*/
edge_type
get_flow
(
edge_type
get_flow
(
...
@@ -283,6 +284,8 @@ namespace dlib
...
@@ -283,6 +284,8 @@ namespace dlib
- let IDX = node_id(it)
- let IDX = node_id(it)
- it represents the directed edge from a node, call it H, to the node IDX. Therefore,
- it represents the directed edge from a node, call it H, to the node IDX. Therefore,
this function returns get_flow(H,IDX)
this function returns get_flow(H,IDX)
- It is valid for this function to return a floating point value of infinity.
This value means this edge has an unlimited capacity.
!*/
!*/
edge_type
get_flow
(
edge_type
get_flow
(
...
@@ -296,6 +299,8 @@ namespace dlib
...
@@ -296,6 +299,8 @@ namespace dlib
- let IDX = node_id(it)
- let IDX = node_id(it)
- it represents the directed edge from node IDX to another node, call it H. Therefore,
- it represents the directed edge from node IDX to another node, call it H. Therefore,
this function returns get_flow(IDX,H)
this function returns get_flow(IDX,H)
- It is valid for this function to return a floating point value of infinity.
This value means this edge has an unlimited capacity.
!*/
!*/
void
adjust_flow
(
void
adjust_flow
(
...
@@ -398,7 +403,7 @@ namespace dlib
...
@@ -398,7 +403,7 @@ namespace dlib
- sink_node < g.number_of_nodes()
- sink_node < g.number_of_nodes()
- for all valid i and j:
- for all valid i and j:
- g.get_flow(i,j) >= 0
- g.get_flow(i,j) >= 0
(i.e. all the flow capacities/edge weights are
posi
tive)
(i.e. all the flow capacities/edge weights are
non-nega
tive)
- g does not contain any self loops. That is, no nodes are neighbors with
- g does not contain any self loops. That is, no nodes are neighbors with
themselves.
themselves.
ensures
ensures
...
...
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