UniqueUndirectedEdges
public struct UniqueUndirectedEdges<Graph: IncidenceGraph>: EdgeFilterProtocol, DefaultInitializable
where Graph.VertexId: Comparable
Removes half of all edges, such that if both (u, v) and (v, u) were in the graph previously, only one will remain afterwards.
When applied to an IncidenceGraph that models an undirected graph (i.e. there are incident
edges when queried from both sides), UniqueUndirectedEdges will filter out half.
If UniqueUndirectedEdges is applied to a graph that doesn’t include the edge (u, v) in the
VertexEdgeCollection of both u, and v, unspecified behavior will occur.
To keep using your property maps, simply wrap them with EdgeFilterPropertyMapAdapter‘s.
-
Undocumented
Declaration
Swift
public init() -
Returns
trueifedgeshould be excluded from a filtered representation ofgraph.Declaration
Swift
public func excludeEdge(_ edge: Graph.EdgeId, _ graph: Graph) -> Bool
View on GitHub
UniqueUndirectedEdges Structure Reference