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

Directed pseudo forest #78

Conversation

ferranpujolcamins
Copy link
Collaborator

In this PR I add a subclass of UniqueElementsGraph with the property that vertices have at most one outgoing edge [1].

I also introduce SwiftCheck for property testing.

[1] https://en.wikipedia.org/wiki/Pseudoforest#Directed_pseudoforests

@ferranpujolcamins
Copy link
Collaborator Author

@davecom Now that xcode supports swift packages, do you think we can just get rid of the xcodeproj?

@davecom
Copy link
Owner

davecom commented Mar 5, 2020

Sorry I've been out of touch. I'm going to take a look at this over the weekend. I don't want to get rid of the Xcode project because it has the Mac sample app and it also just makes it easy for people unfamiliar with SPM/Cocoapods to get started.

@ferranpujolcamins
Copy link
Collaborator Author

I understand. I'll add the SwiftCheck package on the proj also then.

- Fix the xcodeproj
- Fix pseudoforest property tests
- Move graph properties to SwiftGraph package so they can be used to
  validate a graph (e.g. after deserialization).
- Add an allDistinct overload for non hashable collections.
- Add property tests for the internal allDistinct function used in the
  validation methods.
@ferranpujolcamins
Copy link
Collaborator Author

I'm done with the final touches, the PR is ready from my side. Let me know what you think.

@ferranpujolcamins
Copy link
Collaborator Author

Found a bug on the graph validation code. I'm writing tests now.

@davecom
Copy link
Owner

davecom commented Mar 9, 2020

Hi @ferranpujolcamins,
Thanks for putting this together. There's good stuff here, but I don't want to add SwiftCheck as a dependency (which in turn has another package as a dependency, which in turn has yet another package as a dependency). We currently have no dependencies that are not shipped with Swift, and I'd like to keep it that way. Especially since SwiftGraph is part of the Swift source compatibility suite, but also because I don't want to start being dependent on other projects as Swift continues to evolve.

Let's put the generators into the main project. Our project is not large enough that we need to start splitting it up into subdivisions.

Can you also add some comments in. I don't know what some of these are supposed to do.

Thanks,
Dave

@ferranpujolcamins
Copy link
Collaborator Author

ferranpujolcamins commented Mar 9, 2020 via email

@ferranpujolcamins
Copy link
Collaborator Author

@davecom Gentle ping.

I will strip the property tests from the PR and leave only
DirectedPseudoForest. Then I will add a bunch of normal tests for it.

Do you think this would fit SwiftGraph?

@davecom
Copy link
Owner

davecom commented Mar 27, 2020

@ferranpujolcamins Sorry for the late reply. I think your plan is good!

@ferranpujolcamins
Copy link
Collaborator Author

I'm not finding the time to do this. I'm closing the PR by now. My apologies.

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