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

Minor issue in SetCover #399

Open
danyaljj opened this issue Sep 21, 2016 · 2 comments
Open

Minor issue in SetCover #399

danyaljj opened this issue Sep 21, 2016 · 2 comments
Assignees

Comments

@danyaljj
Copy link
Member

Potentially a bug:
I think this line should be changed to:

SetCoverSolverDataModel.cityContainsNeighborhoods.populateWith((c: City, n: Neighborhood)=> n.getParentCity == c)

I am not sure how similar lines in the test work either: https://github.com/IllinoisCogComp/saul/blob/310ca43a618b7928c5c1a352a4059a0c87578780/saul-examples/src/test/scala/edu/illinois/cs/cogcomp/saulexamples/SetCoverTest.scala#L26

@danyaljj danyaljj self-assigned this Sep 21, 2016
@bhargav
Copy link
Contributor

bhargav commented Sep 21, 2016

Since the condition has .populateWith(_ == _.getParentCity), I believe the first _ is assigned the City and the second the Neighborhood parameter. Hence the behavior looks correct. Though we should fix it for readability.

http://www.codecommit.com/blog/scala/quick-explanation-of-scalas-syntax

@danyaljj
Copy link
Member Author

That's what I thought; although intelliJ seems unhappy: "comparing incompatible types".
it's probably a false alarm ...

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

No branches or pull requests

2 participants