Skip to content

Conversation

@sapphire-arches
Copy link
Contributor

@sapphire-arches sapphire-arches commented May 4, 2018

Fixes #15. The multidegree tracking isn't critical and I can rip it out pretty easily, but I wanted to answer @chrisvittal's question on gitter 😉 (the answer turns out to be yes).

@sapphire-arches
Copy link
Contributor Author

Ooops, looks like Travis is sad because of rust-lang/rust#50401. I'll submit a PR to fix that.

@sapphire-arches
Copy link
Contributor Author

See #17 for the promised patch =)

@nikomatsakis
Copy link
Contributor

@bobtwinkles this seems good -- I was thinking last night that this could be done in differential-dataflow itself pretty nicely, instead of writing up custom rust code. If you're curious to learn how that stuff works, I can give you a few hints. The idea would be roughly to add some code like:

let region_in_degrees = subset
    .map(|(_r1, r2, p)| (r2, p)) // just preserve target region and point

this will create numerous duplicate tuples; the differential-dataflow preserves that and tracks their number. So then when you invoke inspect_batch, you will get a "multiplicity" that is equal to the in-degree. (If you look at the existing inspect_batch routines, you will see we always assert the multiplicity is 1; this is because we invoke distinct() to remove multiple instances.)

There's probably a way to find the count or the max as well, I'm not sure off the top of my head. Anyway, as this is just debug output, it doesn't matter that much, but if you want to take a stab at refactoring, might be fun for getting your feet wet.

@nikomatsakis nikomatsakis merged commit 199f78d into rust-lang:master May 4, 2018
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