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
FLINK-1737: Kronecker product #1078
Conversation
… vectors, More tests are to come.
… vectors, More tests are to come.
…t to SparseVector suite that correspond to the one from the suite for DenseVector.
Thanks a lot for the pull request. |
Your build is failing due to scalastyle checks
|
other match { | ||
case SparseVector(size, indices, data_) => | ||
val entries: Array[(Int, Int, Double)] = for { | ||
i <- (0 until numRows).toArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we don't need calling toArray
.
Looks good to me except some minor issues (including things @rmetzger said). But there is no JIRA issue covered this PR. We should create JIRA issue first. |
Will be fixed and I will also review what @chiwanpark suggested, though I think .toArray was called with an intend (for comprehensions yield collections of the same type as the type of the first collection put into them). |
|
||
other match { | ||
case SparseVector(size, indices, data_) => | ||
val entries: Array[(Int, Int, Double)] = for { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need an Array
here. An Iterable
should be enough for the method SparseMatrix.fromCOO
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assumption fallacy on my part, I guess. Thanks for persisting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed by now.
Thank you very much @daniel-pape for you contribution. Looks really good. I had only some minor comments. |
Reduced warnings by removing val keyword from case class field and added missing parameter documentation.
…SparseVector.apply` (which involves binary search). Reduced warning by three: Removed unnecessary `val` keyword from case class fields.
val numCols = other.size | ||
|
||
other match { | ||
case sv @ SparseVector(_, _, _) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can write case sv: SparseVector =>
Sorry for my late reply @daniel-pape. The PR looks really good. I had only one minor comment. Once this is fixed, it's good to be merged. |
…ry search by using zipWithIndex").
Thanks for the comment @tillrohrmann. Just pushed the changes. |
Looks really good :-) Thanks for your contribution @daniel-pape. Will merge it. |
This is preparational work related to FLINK-1737: Adds an implementation of outer/Kronecker product which can subsequently be used to compute the sample covariance matrix.