flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daniel-pape <...@git.apache.org>
Subject [GitHub] flink pull request: FLINK-1737: Kronecker product
Date Sun, 27 Sep 2015 17:46:28 GMT
Github user daniel-pape commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1078#discussion_r40507042
  
    --- Diff: flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/math/DenseVector.scala
---
    @@ -102,6 +102,38 @@ case class DenseVector(
         }
       }
     
    +  /** Returns the outer product (a.k.a. Kronecker product) of `this`
    +    * with `other`. The result will given in [[org.apache.flink.ml.math.SparseMatrix]]
    +    * representation if `other` is sparse and as [[org.apache.flink.ml.math.DenseMatrix]]
otherwise.
    +    *
    +    * @param other a Vector
    +    * @return the [[org.apache.flink.ml.math.Matrix]] which equals the outer product
of `this`
    +    *         with `other.`
    +    */
    +  override def outer(other: Vector): Matrix = {
    +    val numRows = size
    +    val numCols = other.size
    +
    +    other match {
    +      case SparseVector(size, indices, data_) =>
    +        val entries: Array[(Int, Int, Double)] = for {
    --- End diff --
    
    Assumption fallacy on my part, I guess. Thanks for persisting. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message