org.wso2.extension.siddhi.execution.streamingml.util

## Class MathUtil

- java.lang.Object
- - org.wso2.extension.siddhi.execution.streamingml.util.MathUtil

-     public class MathUtil
      extends Object

  Special mathematical functions used in the ML algorithms.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MathUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `dot(double[] vector1, double[] vector2)` Dot product of two 'double' vectors.
    `static double` | `euclideanDistance(double[] point1, double[] point2)` Finds the euclidean distance between two input points of equal dimension

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

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

- - ### Constructor Detail

    - #### MathUtil

          public MathUtil()

  - ### Method Detail

    - #### dot

          public static double dot(double[] vector1,
                                   double[] vector2)

      Dot product of two 'double' vectors.
      Parameters:
        `vector1` - vector 1
        `vector2` - vector 2
      Returns:
        the dot product.

    - #### euclideanDistance

          public static double euclideanDistance(double[] point1,
                                                 double[] point2)

      Finds the euclidean distance between two input points of equal dimension
      Parameters:
        `point1` - input point one
        `point2` - input point two
      Returns:
        euclidean distance between point1 and point2

Copyright © 2019 WSO2. All rights reserved.