Annoy Index class Inheritance Diagrams (MRO)#

This page shows the class inheritance structure for the Annoy backend and the high-level Index facade class, using Sphinx’s built-in inheritance diagram support (the same approach used in Matplotlib’s docs).

Index + mixins#

Inheritance diagram of scikitplot.cexternals._annoy.Annoy, scikitplot.annoy._mixins._meta.MetaMixin, scikitplot.annoy._mixins._io.IndexIOMixin, scikitplot.annoy._mixins._pickle.PickleMixin, scikitplot.annoy._mixins._vectors.VectorOpsMixin, scikitplot.annoy._mixins._ndarray.NDArrayMixin, scikitplot.annoy._mixins._plotting.PlottingMixin, scikitplot.annoy.Index

Reading this diagram

  • Annoy is the low-level C-extension backend and owns the actual index state and core operations.

  • Index is the Python facade that subclasses the backend and composes behavior using independent mixins.

Mixins only (independence + MRO scan)#

This diagram focuses only on the mixins so you can quickly confirm there is no unexpected inheritance between mixins (they should be independent).

Inheritance diagram of scikitplot.annoy._mixins._meta.MetaMixin, scikitplot.annoy._mixins._io.IndexIOMixin, scikitplot.annoy._mixins._pickle.PickleMixin, scikitplot.annoy._mixins._vectors.VectorOpsMixin, scikitplot.annoy._mixins._ndarray.NDArrayMixin, scikitplot.annoy._mixins._plotting.PlottingMixin

Notes and Limitations#

Inheritance diagrams show class derivation, but they do not show composition relationships (e.g., an optional self._annoy backend attribute). For composition support, refer to the “glue” helpers documented elsewhere (e.g., backend_for(self), lock_for(self)).

  • An inheritance diagram shows “parent → child” class relationships.

  • It helps you understand which class extends another class.

Sphinx can render inheritance diagrams using the built-in extension sphinx.ext.inheritance_diagram. The diagram is rendered using Graphviz (the dot tool), so Graphviz must be available in your build environment.

Note

In your conf.py:

extensions += ["sphinx.ext.inheritance_diagram"]

See Also#