=============
API Reference
=============

This section provides detailed API documentation for the ``gdpnum`` library.

.. toctree::
   :maxdepth: 2

   converter
   dpsgd

Module Structure
================

The ``gdpnum`` library consists of the following main modules:

- ``gdpnum.converter``: Contains the ``PLDConverter`` class for converting Privacy Loss Distributions to GDP parameters
- ``gdpnum.dpsgd``: Provides specialized functions and classes for analyzing DP-SGD with GDP

Top-level Imports
=================

The following items are available directly from the ``gdpnum`` module:

.. code-block:: python

    from gdpnum import PLDConverter  # Main class for converting PLDs to GDP
    from gdpnum import CTDAccountant  # Accountant for tracking privacy in DP-SGD
    from gdpnum import get_worst_case_regret  # Utility function for computing regret

Main Classes
============

.. autoclass:: gdpnum.PLDConverter
   :members:
   :undoc-members:
   :special-members: __init__

.. autoclass:: gdpnum.dpsgd.CTDAccountant
   :members:
   :undoc-members:
   :special-members: __init__

Main Functions
==============

.. autofunction:: gdpnum.dpsgd.get_mu_and_regret_for_dpsgd

.. autofunction:: gdpnum.get_worst_case_regret