Clarified spec regarding infinite factor potentials and flow capacities.

This commit is contained in:
Davis King 2012-05-21 20:52:30 -04:00
parent 1bcab299ec
commit 3b4a2308d9
2 changed files with 16 additions and 3 deletions

View File

@ -138,6 +138,9 @@ namespace dlib
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
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 (
@ -156,6 +159,7 @@ namespace dlib
different labels. Larger values indicate a larger penalty.
- this function is symmetric. That is, it is true that:
factor_value_disagreement(i,j) == factor_value_disagreement(j,i)
- The return value should be a finite value.
!*/
};
@ -218,6 +222,9 @@ namespace dlib
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
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 (
@ -241,6 +248,7 @@ namespace dlib
different labels. Larger values indicate a larger penalty.
- this function is symmetric. That is, it is true that:
factor_value_disagreement(i,j) == factor_value_disagreement(j,i)
- The return value should be a finite value.
!*/
};

View File

@ -268,8 +268,9 @@ namespace dlib
- idx2 < number_of_nodes()
- idx1 and idx2 are neighbors in the graph
ensures
- returns the residual flow capacity from the idx1-th
node to the idx2-th node.
- returns the residual flow capacity from the idx1-th 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 (
@ -283,6 +284,8 @@ namespace dlib
- let IDX = node_id(it)
- it represents the directed edge from a node, call it H, to the node IDX. Therefore,
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 (
@ -296,6 +299,8 @@ namespace dlib
- let IDX = node_id(it)
- it represents the directed edge from node IDX to another node, call it H. Therefore,
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 (
@ -398,7 +403,7 @@ namespace dlib
- sink_node < g.number_of_nodes()
- for all valid i and j:
- g.get_flow(i,j) >= 0
(i.e. all the flow capacities/edge weights are positive)
(i.e. all the flow capacities/edge weights are non-negative)
- g does not contain any self loops. That is, no nodes are neighbors with
themselves.
ensures