You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both edmonds_maximum_cardinality_matching and checked_edmonds_maximum_cardinality_matching find the maximum cardinality matching in any undirected graph.
No one else problems detected yet, but it should not be allowed to run on a directed graph. Eventually a problem will happen and the current results with directed graph are invalid for the problem definition.
About results
seq is not needed as the results unique identifier can be edge
And because the graph is undirected, source and target are also not needed.
Those are values that can be found by joining the result with the edges table on the database.
About the inner query
SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table
Following the general form on the inner query, it should be
SELECT id, source, target, cost, reverse_cost FROM edge_table
Changes
SQL
On V3
Create function pgr_maxCardinalityMatch(Edges SQL) -> returns edge
Deprecate function pgr_maxCardinalityMatch(Edges SQL, [directed]) -> returns (seq, edge, source, target)
On V4
Remove function pgr_maxCardinalityMatch(Edges SQL, [directed])
code
On V3
Ignore the flag
Accept cost and reverse_cost as columns on the inner query
On V4
Problems
Algorithm works for undirected graph only
From boost
I tried the example with directed graph.
No one else problems detected yet, but it should not be allowed to run on a directed graph. Eventually a problem will happen and the current results with directed graph are invalid for the problem definition.
About results
seq
is not needed as the results unique identifier can be edgesource
andtarget
are also not needed.About the inner query
Following the general form on the inner query, it should be
Changes
SQL
On V3
pgr_maxCardinalityMatch(Edges SQL)
-> returnsedge
pgr_maxCardinalityMatch(Edges SQL, [directed])
-> returns(seq, edge, source, target)
On V4
pgr_maxCardinalityMatch(Edges SQL, [directed])
code
On V3
cost
andreverse_cost
as columns on the inner queryOn V4
going
&coming
TODO
The text was updated successfully, but these errors were encountered: