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