Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

179 - more graph operations #230

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

lypoluz
Copy link
Contributor

@lypoluz lypoluz commented Jan 24, 2024

Adding additional graph operations. These include complement, intersection and join.

Copy link

netlify bot commented Jan 24, 2024

Doxygen Documentation successfully built!

Name Link
🔨 Latest commit ea5557b
🔍 Latest deploy log https://app.netlify.com/sites/ogdf/deploys/660ce2cbd933d5000838417b
😎 Deploy Preview https://deploy-preview-230--ogdf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/ogdf/basic/graph_generators/operations.cpp Outdated Show resolved Hide resolved
src/ogdf/basic/graph_generators/operations.cpp Outdated Show resolved Hide resolved
src/ogdf/basic/graph_generators/operations.cpp Outdated Show resolved Hide resolved
Copy link
Member

@N-Coder N-Coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, can merge once CI passes and you give your ok

void join(Graph& G1, const Graph& G2, NodeArray<node>& nodeMap) {
OGDF_ASSERT(nodeMap.valid());
void join(Graph& G1, const Graph& G2, NodeArray<node>& mapping) {
OGDF_ASSERT(mapping.valid());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of (or maybe in addition to) valid() I'd rather check mapping.graphOf() == &G2

it("creates an edge where there was none", [&]() {
complement(G, false, false);
edge edge12 = G.searchEdge(n1, n2);
AssertThat(edge12, Is().Not().Null());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also !IsNull() if that is more convenient to you...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants