flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetzger <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-1718] Adds sparse matrix and sparse vec...
Date Fri, 27 Mar 2015 16:17:52 GMT
Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/539#discussion_r27307815
  
    --- Diff: flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/math/DenseVector.scala
---
    @@ -67,7 +63,25 @@ case class DenseVector(val values: Array[Double]) extends Vector {
        * @return Copy of the vector instance
        */
       override def copy: Vector = {
    -    DenseVector(values.clone())
    +    DenseVector(data.clone())
    +  }
    +
    +  /** Updates the element at the given index with the provided value
    +    *
    +    * @param index
    +    * @param value
    +    */
    +  override def update(index: Int, value: Double): Unit = {
    +    require(0 <= index && index < data.length, s"Index $index is out of
bounds " +
    --- End diff --
    
    Might be inefficient.


---
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