r"""Access most core library functions with a single import.

.. code-block:: python

    import deepali.core.functional as U

"""

# Basic tensor functions
from .math import abspow
from .math import atanh
from .math import max_difference
from .math import round_decimals
from .math import threshold

from .tensor import as_tensor
from .tensor import as_float_tensor
from .tensor import as_one_hot_tensor
from .tensor import atleast_1d
from .tensor import batched_index_select
from .tensor import move_dim
from .tensor import unravel_coords
from .tensor import unravel_index

# Linear algebra/geometry
from .affine import affine_rotation_matrix
from .affine import apply_transform as apply_affine_transform
from .affine import euler_rotation_matrix
from .affine import euler_rotation_angles
from .affine import euler_rotation_order
from .affine import identity_transform
from .affine import rotation_matrix
from .affine import scaling_transform
from .affine import shear_matrix
from .affine import translation
from .affine import transform_points as affine_transform_points
from .affine import transform_vectors as affine_transform_vectors

from .linalg import angle_axis_to_rotation_matrix
from .linalg import angle_axis_to_quaternion
from .linalg import as_homogeneous_matrix
from .linalg import as_homogeneous_tensor
from .linalg import hmm
from .linalg import homogeneous_matmul
from .linalg import homogeneous_matrix
from .linalg import homogeneous_transform
from .linalg import normalize_quaternion
from .linalg import quaternion_to_angle_axis
from .linalg import quaternion_to_rotation_matrix
from .linalg import quaternion_log_to_exp
from .linalg import quaternion_exp_to_log
from .linalg import rotation_matrix_to_angle_axis
from .linalg import rotation_matrix_to_quaternion
from .linalg import tensordot
from .linalg import vectordot
from .linalg import vector_rotation

# Data operations
from .bspline import bspline_interpolation_weights
from .bspline import cubic_bspline_control_point_grid
from .bspline import cubic_bspline_control_point_grid_size
from .bspline import evaluate_cubic_bspline
from .bspline import subdivide_cubic_bspline

from .image import avg_pool, max_pool, min_pool
from .image import conv, conv1d
from .image import dot_batch, dot_channels
from .image import downsample, upsample
from .image import gaussian_pyramid
from .image import crop, pad
from .image import center_crop, center_pad
from .image import fill_border
from .image import finite_differences
from .image import flatten_channels
from .image import grid_resample
from .image import grid_reshape
from .image import grid_resize
from .image import grid_sample
from .image import grid_sample_mask
from .image import image_slice
from .image import normalize_image
from .image import rand_sample
from .image import rescale
from .image import sample_image
from .image import spatial_derivatives

from .image import circle_image
from .image import cshape_image
from .image import empty_image
from .image import grid_image
from .image import ones_image
from .image import zeros_image

from .flow import affine_flow
from .flow import compose_flows
from .flow import compose_svfs
from .flow import curl
from .flow import denormalize_flow
from .flow import divergence
from .flow import divergence_free_flow
from .flow import expv
from .flow import flow_derivatives
from .flow import jacobian_det
from .flow import jacobian_dict
from .flow import jacobian_matrix
from .flow import lie_bracket
from .flow import logv
from .flow import normalize_flow
from .flow import sample_flow
from .flow import warp_grid
from .flow import warp_image
from .flow import warp_points
from .flow import zeros_flow

from .pointset import bounding_box
from .pointset import distance_matrix
from .pointset import closest_point_distances
from .pointset import closest_point_indices
from .pointset import denormalize_grid
from .pointset import normalize_grid
from .pointset import polyline_directions
from .pointset import polyline_tangents
from .pointset import transform_grid
from .pointset import transform_points

from .random import multinomial


__all__ = (
    # Basic tensor functions
    "abspow",
    "as_tensor",
    "as_float_tensor",
    "as_one_hot_tensor",
    "atanh",
    "atleast_1d",
    "batched_index_select",
    "max_difference",
    "move_dim",
    "round_decimals",
    "threshold",
    "unravel_coords",
    "unravel_index",
    # Random sampling
    "multinomial",
    # Linear algebra/geometry
    "affine_flow",
    "affine_rotation_matrix",
    "affine_transform_points",
    "affine_transform_vectors",
    "angle_axis_to_rotation_matrix",
    "angle_axis_to_quaternion",
    "apply_affine_transform",
    "as_homogeneous_matrix",
    "as_homogeneous_tensor",
    "euler_rotation_matrix",
    "euler_rotation_angles",
    "euler_rotation_order",
    "hmm",
    "homogeneous_matmul",
    "homogeneous_matrix",
    "homogeneous_transform",
    "identity_transform",
    "normalize_quaternion",
    "quaternion_to_angle_axis",
    "quaternion_to_rotation_matrix",
    "quaternion_log_to_exp",
    "quaternion_exp_to_log",
    "rotation_matrix",
    "rotation_matrix_to_angle_axis",
    "rotation_matrix_to_quaternion",
    "scaling_transform",
    "shear_matrix",
    "tensordot",
    "translation",
    "vectordot",
    "vector_rotation",
    # Data operations
    "avg_pool",
    "bounding_box",
    "bspline_interpolation_weights",
    "center_crop",
    "center_pad",
    "circle_image",
    "closest_point_distances",
    "closest_point_indices",
    "compose_flows",
    "compose_svfs",
    "conv",
    "conv1d",
    "crop",
    "cshape_image",
    "cubic_bspline_control_point_grid",
    "cubic_bspline_control_point_grid_size",
    "curl",
    "denormalize_flow",
    "denormalize_grid",
    "distance_matrix",
    "divergence",
    "divergence_free_flow",
    "dot_batch",
    "dot_channels",
    "downsample",
    "empty_image",
    "evaluate_cubic_bspline",
    "expv",
    "flatten_channels",
    "finite_differences",
    "flow_derivatives",
    "gaussian_pyramid",
    "grid_image",
    "image_slice",
    "pad",
    "fill_border",
    "grid_resample",
    "grid_reshape",
    "grid_resize",
    "grid_sample",
    "grid_sample_mask",
    "jacobian_det",
    "jacobian_dict",
    "jacobian_matrix",
    "lie_bracket",
    "logv",
    "max_pool",
    "min_pool",
    "normalize_flow",
    "normalize_grid",
    "normalize_image",
    "ones_image",
    "polyline_directions",
    "polyline_tangents",
    "rand_sample",
    "rescale",
    "sample_flow",
    "sample_image",
    "spatial_derivatives",
    "subdivide_cubic_bspline",
    "transform_grid",
    "transform_points",
    "upsample",
    "warp_grid",
    "warp_image",
    "warp_points",
    "zeros_flow",
    "zeros_image",
)
