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

Undirected Graphs #1

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jmatsushita
Copy link

@jmatsushita jmatsushita commented Sep 25, 2021

Hi there,

I started working on porting the Undirected module from alga but with some failing tests for now. and the tests pass now.

Probably quite inefficient but it's a start :)

Cheers,

Jun

--

UPDATE:

Here are some things to continue working on before merging:

  • Write tests for each undirected module functions
    • Fix edgeCount,...
  • Import docs from alga
  • Implement Algebra.Graph.AdjacencyMap.Undirected (following this comment from alga

@thomashoneyman thomashoneyman marked this pull request as ready for review September 25, 2021 21:57
@thomashoneyman
Copy link
Owner

Sorry, didn’t mean to mark this ready to review 😅 thanks for adding this!

To be honest I wrote the core of this in a few hours and haven’t looked at it since (it’s also unpublished), so if you are interested in implementing the library and don’t want to have to wait on me please feel free to take the code here and build on it in your own library. Otherwise I’m happy to review and merge things here!

@jmatsushita
Copy link
Author

Hi Thomas, thanks a lot. I'd be quite happy to have your feedback as I make progress with my exploration of the library and hopefully succeeding in implementing a Comonad instance for it as I did for learning purposes in fgl here https://github.com/amhuppert/purescript-fgl/pull/1/files

@jmatsushita
Copy link
Author

I think undirected graphs work now. Had to implement a probably very inefficient Set.cartesianProduct and only implemented what I needed for simple tests.

Can I suggest to review this first and then maybe do a docs PR (basically pasting the docs from alga) and it would be nice to maybe have it on Pursuit then (if its possible these days?).

Cheers,

Jun

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.

2 participants