.. # split from OESystemFunctions.rst:2710
.. include:: ../substitutions
.. oe:namespace:: OESystem
.. meta::
:keywords: OETanimoto
.. oe:function:: OETanimoto
.. oe:api::
double OETanimoto(const OEBitVector &a, const OEBitVector &b)
Calculates the ``Tanimoto similarity coefficient`` between two
:oe:cls:`OEBitVectors`.
This is defined as the
number of bits that the two bitmaps/fingerprints have in common
divided by the total of bits set in either. This function does not
require that the two :oe:cls:`OEBitVectors`
be the same size, the bits
lacking from the shorter :oe:cls:`OESystem::OEBitVector` being interpreted as all
zeros. This function always returns ``1.0``, if the two
:oe:cls:`OEBitVectors`
are equal, even if they are both empty.