Package org.apache.solr.client.solrj.io.eval

## Class CosineDistanceEvaluator.CosineDistance

- java.lang.Object
- - org.apache.solr.client.solrj.io.eval.CosineDistanceEvaluator.CosineDistance

All Implemented Interfaces:
  `Serializable`, `org.apache.commons.math3.ml.distance.DistanceMeasure`

Enclosing class:
  CosineDistanceEvaluator

    public static class CosineDistanceEvaluator.CosineDistance
    extends Object
    implements org.apache.commons.math3.ml.distance.DistanceMeasure

See Also:
  Serialized Form

### Constructor Summary

Constructors
`CosineDistance()`

### Method Summary

All Methods Instance Methods Concrete Methods
`double` `compute​(double[] v1, double[] v2)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CosineDistance

    public CosineDistance()

### Method Detail

#### compute

    public double compute​(double[] v1,
                          double[] v2)
                   throws org.apache.commons.math3.exception.DimensionMismatchException

Specified by:
  `compute` in interface `org.apache.commons.math3.ml.distance.DistanceMeasure`
Throws:
  `org.apache.commons.math3.exception.DimensionMismatchException`