"""Public API for user-defined elementary functions.

The implementation lives in :mod:`gradgen._custom_elementary`, while this
module preserves the long-standing import surface used by the rest of the
package and by downstream users.
"""

from ._custom_elementary import (
    PythonEvalBuilder,
    RegisteredElementaryFunction,
    ScalarHessianBuilder,
    ScalarHvpBuilder,
    ScalarJacobianBuilder,
    VectorHessianBuilder,
    VectorHvpBuilder,
    VectorJacobianBuilder,
    build_custom_hessian_expr,
    build_custom_hvp_expr,
    build_custom_jacobian_expr,
    clear_registered_elementary_functions,
    custom_scalar_hessian,
    custom_scalar_hvp,
    custom_scalar_jacobian,
    custom_vector_hessian_entry,
    custom_vector_hvp_component,
    custom_vector_jacobian_component,
    evaluate_custom_hessian,
    evaluate_custom_hvp,
    evaluate_custom_jacobian,
    get_registered_elementary_function,
    parse_custom_scalar_args,
    parse_custom_scalar_hvp_args,
    parse_custom_vector_args,
    parse_custom_vector_hessian_entry_args,
    parse_custom_vector_hvp_component_args,
    parse_custom_vector_jacobian_component_args,
    register_elementary_function,
    render_custom_rust_snippet,
)
from ._custom_elementary.callbacks import (
    invoke_custom_callback as _invoke_custom_callback,
    invoke_custom_hvp_callback as _invoke_custom_hvp_callback,
)

__all__ = [
    "PythonEvalBuilder",
    "RegisteredElementaryFunction",
    "ScalarHessianBuilder",
    "ScalarHvpBuilder",
    "ScalarJacobianBuilder",
    "VectorHessianBuilder",
    "VectorHvpBuilder",
    "VectorJacobianBuilder",
    "build_custom_hessian_expr",
    "build_custom_hvp_expr",
    "build_custom_jacobian_expr",
    "clear_registered_elementary_functions",
    "custom_scalar_hessian",
    "custom_scalar_hvp",
    "custom_scalar_jacobian",
    "custom_vector_hessian_entry",
    "custom_vector_hvp_component",
    "custom_vector_jacobian_component",
    "evaluate_custom_hessian",
    "evaluate_custom_hvp",
    "evaluate_custom_jacobian",
    "get_registered_elementary_function",
    "_invoke_custom_callback",
    "_invoke_custom_hvp_callback",
    "parse_custom_scalar_args",
    "parse_custom_scalar_hvp_args",
    "parse_custom_vector_args",
    "parse_custom_vector_hessian_entry_args",
    "parse_custom_vector_hvp_component_args",
    "parse_custom_vector_jacobian_component_args",
    "register_elementary_function",
    "render_custom_rust_snippet",
]
