Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Incorporating thrift, tweaking to get workflow working #82

Merged
merged 1 commit into from
Jul 13, 2012

Conversation

robinkraft
Copy link
Contributor

Dan had to remove some pre/post conditions to get these things working with the workflow. I've opened an issue so that we can revisit this.

@robinkraft
Copy link
Contributor Author

Here's the issue

@@ -133,9 +130,6 @@ supplied, assumes a square matrix."
([edge row col]
(rowcol->idx edge edge row col))
([nrows ncols row col]
{:pre [(not (or (neg? row), (>= row nrows)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These preconditions are added back later in a future pull request, slightly changed.

@danhammer
Copy link
Contributor

LGTM. #shipit

(double (->> (for [[x weight] (partition 2 val-weight-pairs)]
(if (>= weight 0)
[(* x weight) weight]
(throw-illegal "All weights must be positive.")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be a precondition instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should it check for? We just need to be sure that the values coming out are doubles, right? They could come in as other things. @danhammer we ran into a bug for this. Can you remember why we switched this to (double ,,,,,)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry, I thought weight was a parameter to the function. Actually though, do we need to throw an exception here? Like, if weight is greater than or equal to zero, are all bets off?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if weights are < 0 all bets are off. I'll submit an issue so that we handle this in a precondition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danhammer
Copy link
Contributor

@eightysteele where are you at on this?

robinkraft added a commit that referenced this pull request Jul 13, 2012
Incorporating thrift in the utils namespaces, tweaking to get workflow working
@robinkraft robinkraft merged commit 1e4fc4e into develop Jul 13, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants