.. oe:namespace:: OEGraphSim



.. meta::
   :keywords: OETanimotoSim, TanimotoSim


.. _OEGraphSim_OETanimotoSim:

.. oe:class:: OETanimotoSim

   .. oe:api::

      class OETanimotoSim : public OEGraphSim::OESimFuncBase

   This class represents :ref:`OETanimotoSim <OEGraphSim_OETanimotoSim>` that
   calculates the :oe:const:`Tanimoto<OEGraphSim::OESimMeasure::Tanimoto>`
   similarity score.

   **Formula:**

     :math:`Sim_{Tanimoto}(A,B) = \frac{bothAB}{|A| + |B| - bothAB} = \frac{bothAB}{onlyA + onlyB + bothAB}`

   .. seealso::

      * :ref:`section_measure_tanimoto` section
      * :oe:func:`OEGraphSim::OETanimoto` function

   The following methods are publicly inherited from :ref:`OESimFuncBase <OEGraphSim_OESimFuncBase>`:

   ======================================================================= ======================================================================= ========================================================================
   :oe:meth:`operator()<OEGraphSim::OESimFuncBase::operator()>`            :oe:meth:`CreateCopy<OEGraphSim::OESimFuncBase::CreateCopy>`            :oe:meth:`GetSimTypeString<OEGraphSim::OESimFuncBase::GetSimTypeString>`
   ======================================================================= ======================================================================= ========================================================================


   .. ################################################################
      #
      ################################################################

   .. oe:method:: Constructors

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

         .. oe:api::

            OETanimotoSim()

      .. oe:language:: python

         .. oe:api:: python

            OETanimotoSim() -> OETanimotoSim

      Default constructor.


   .. ################################################################
      #
      ################################################################

   .. oe:method:: operator()

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

         .. oe:api::

            float operator()(const OEGraphSim::OEFingerPrint& fpA, const OEGraphSim::OEFingerPrint& fpB) const

      .. oe:language:: python

         .. oe:api:: python

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

      Returns the :oe:const:`Tanimoto<OEGraphSim::OESimMeasure::Tanimoto>`
      similarity coefficient of the two given
      :ref:`OEFingerPrint <OEGraphSim_OEFingerPrint>` objects.


   .. ################################################################
      #
      ################################################################

   .. oe:method:: CreateCopy

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

         .. oe:api::

            OEGraphSim::OESimFuncBase* CreateCopy() const

      .. oe:language:: python

         .. oe:api:: python

            CreateCopy() -> OETanimotoSim

      Deep copy constructor that returns a copy of the object. The memory
      for the returned :ref:`OETanimotoSim <OEGraphSim_OETanimotoSim>` object is
      dynamically allocated and owned by the caller.


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetSimTypeString

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

         .. oe:api::

            std::string GetSimTypeString() const

      .. oe:language:: python

         .. oe:api:: python

            GetSimTypeString() -> str

      Returns a string representation of the
      :ref:`OETanimotoSim <OEGraphSim_OETanimotoSim>` class.

