Github user erikerlandson commented on the pull request:

    https://github.com/apache/spark/pull/1964#issuecomment-53108224
  
    the implicit conversion function doesn't have to throw an exception, it 
just needs to override the breeze vector overloading and inherit the default 
spark vector overloading as usual:
    
        implicit def functionToDistanceMeasure(f: (BV[Double], BV[Double]) => 
Double): DistanceMeasure = new DistanceMeasure {
             override def apply(v1: BV[Double], v2: BV[Double]): Double = f(v1, 
v2)
        }
    
    I guess there also needs to be a `functionToDistanceMetric`
    
    Aside from that I think it is looking good.  Thank you for your work on 
this!
    



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to