Skip to content

sphere_patch_based_geometric_interdependence

Bases: geometric_interdependence

A geometric interdependence class using spherical patches.

This class applies geometric interdependence based on sphere-shaped patches within a grid structure.

Attributes:

Name Type Description
patch sphere

The sphere patch structure used for interdependence.

Methods:

Name Description
__init__

Initializes the spherical patch-based geometric interdependence function.

Source code in tinybig/interdependence/geometric_interdependence.py
class sphere_patch_based_geometric_interdependence(geometric_interdependence):
    """
        A geometric interdependence class using spherical patches.

        This class applies geometric interdependence based on sphere-shaped patches within a grid structure.

        Attributes
        ----------
        patch : sphere
            The sphere patch structure used for interdependence.

        Methods
        -------
        __init__(r, ...)
            Initializes the spherical patch-based geometric interdependence function.
    """
    def __init__(
        self,
        r: int,
        name: str = 'sphere_patch_based_geometric_interdependence',
        *args, **kwargs
    ):
        """
            Initializes the spherical patch-based geometric interdependence function.

            Parameters
            ----------
            r : int
                Radius of the sphere patch.
            name : str, optional
                Name of the interdependence function. Defaults to 'sphere_patch_based_geometric_interdependence'.
            *args : tuple
                Additional positional arguments for the parent class.
            **kwargs : dict
                Additional keyword arguments for the parent class.
        """
        patch = sphere(r=r)
        super().__init__(name=name, patch=patch, *args, **kwargs)

__init__(r, name='sphere_patch_based_geometric_interdependence', *args, **kwargs)

Initializes the spherical patch-based geometric interdependence function.

Parameters:

Name Type Description Default
r int

Radius of the sphere patch.

required
name str

Name of the interdependence function. Defaults to 'sphere_patch_based_geometric_interdependence'.

'sphere_patch_based_geometric_interdependence'
*args tuple

Additional positional arguments for the parent class.

()
**kwargs dict

Additional keyword arguments for the parent class.

{}
Source code in tinybig/interdependence/geometric_interdependence.py
def __init__(
    self,
    r: int,
    name: str = 'sphere_patch_based_geometric_interdependence',
    *args, **kwargs
):
    """
        Initializes the spherical patch-based geometric interdependence function.

        Parameters
        ----------
        r : int
            Radius of the sphere patch.
        name : str, optional
            Name of the interdependence function. Defaults to 'sphere_patch_based_geometric_interdependence'.
        *args : tuple
            Additional positional arguments for the parent class.
        **kwargs : dict
            Additional keyword arguments for the parent class.
    """
    patch = sphere(r=r)
    super().__init__(name=name, patch=patch, *args, **kwargs)