stchang / graph

Generic graph library and algorithms for Racket.
Apache License 2.0
58 stars 21 forks source link

Add matrix->matrix-graph. #59

Closed scolobb closed 3 years ago

scolobb commented 3 years ago

Add the function matrix->matrix-graph which does essentially the same thing as the mk-matrix-graph syntax rule, but will be easier to add to the Typed Racket interface, see Issue #58 .

Weirdly enough, I had to do quite a bit of head scratching for this PR, and I am particularly unsure about the following things:

What do you think?

stchang commented 3 years ago

Sorry, somehow missed this! Will look at it next week.

stchang commented 3 years ago

merged 36e1c701df55bc4c2476f61ca710e9cde7e0e22f

stchang commented 3 years ago

Thanks for the pr! I also merged the two constructors, but I had to add an optional argument to avoid confusing err msgs. Hope that's ok.

scolobb commented 3 years ago

Thank you @stchang !

Nice idea having that optional argument. This shouldn't be an issue for Typed Racket.