.. include:: ../substitutions

.. oe:namespace:: OEGraphSim

.. meta::
   :keywords: OECosine

.. oe:function:: OECosine

   .. oe:language:: c++ java csharp

      .. oe:api::

         float OECosine(const OEFingerPrint& fpA, const OEFingerPrint& fpB)

   .. oe:language:: python

      .. oe:api:: python

         OECosine(fpA: OEFingerPrint, fpB: OEFingerPrint) -> float

   Calculates the Cosine similarity value of two
   :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` objects.

   **Formula:**
     :math:`Sim_{Cosine}(A,B) = \frac{bothAB}{\sqrt{(onlyA + bothAB) * (onlyB + bothAB)}}`

   .. seealso::

      * :ref:`section_measure_cosine` section

