digraphs / Digraphs

The GAP package Digraphs
https://digraphs.github.io/Digraphs
Other
29 stars 42 forks source link

Add DigraphContractEdge #618

Closed saffronmciver closed 2 months ago

saffronmciver commented 4 months ago

Initial implementation of ContractEdge (see Contract Edge Wikipedia Article; as discussed, this implementation should not create multiple edges). Mutable and Immutable methods exist for this.

Edge labels should be handled if DigraphRemoveEdge were removing them, but this has not been tested yet because of this issue.

Contract edge takes a non looping edge (u, v), and contracts this into a single vertex w. The edge is removed, vertex labels are combined (in a list), and incident edges to (u, v) become incident to w. MultiDigraphs are not accepted into this function. If an edge (v, u) exists, this is also contracted (removed).

Documentation has not been written yet (this is in progress).

james-d-mitchell commented 3 months ago

@saffronmciver is this ready for review?

saffronmciver commented 3 months ago

@saffronmciver is this ready for review?

This is ready for review, thank you!

saffronmciver commented 3 months ago

@mtorpey @james-d-mitchell Changes above should be in da26d4d71032d76aac0eee96a27cba4e5869288d. Thank you

azure-pipelines[bot] commented 3 months ago
There was an error handling pipeline event 705e23b1-4175-4bca-810c-8f60dba4819a.
james-d-mitchell commented 3 months ago

I've just rebased this onto main which will hopefully fix the CI.

james-d-mitchell commented 3 months ago

Closing and re-opening to trigger ci

james-d-mitchell commented 2 months ago

Thanks @saffronmciver !