Skip to content

cuboid_patch_based_geometric_interdependence

Bases: geometric_interdependence

A geometric interdependence class with cuboid patches.

This class uses cuboid-shaped patches for interdependence calculations.

Methods:

Name Description
__init__

Initializes the cuboid patch-based geometric interdependence function.

Source code in tinybig/interdependence/geometric_interdependence.py
class cuboid_patch_based_geometric_interdependence(geometric_interdependence):
    """
        A geometric interdependence class with cuboid patches.

        This class uses cuboid-shaped patches for interdependence calculations.

        Methods
        -------
        __init__(...)
            Initializes the cuboid patch-based geometric interdependence function.
    """
    def __init__(
        self,
        p_h: int, p_w: int, p_d: int,
        p_h_prime: int = None, p_w_prime: int = None, p_d_prime: int = None,
        name: str = 'cuboid_patch_based_geometric_interdependence',
        *args, **kwargs
    ):
        """
            Initializes the cuboid patch-based geometric interdependence function.

            Parameters
            ----------
            p_h, p_w, p_d : int
                Dimensions of the cuboid patch (height, width, depth).
            p_h_prime, p_w_prime, p_d_prime : int, optional
                Output dimensions of the cuboid patch. Defaults to None.
            name : str, optional
                Name of the interdependence function. Defaults to 'cuboid_patch_based_geometric_interdependence'.
            *args : tuple
                Additional positional arguments for the parent class.
            **kwargs : dict
                Additional keyword arguments for the parent class.
        """
        patch = cuboid(p_h=p_h, p_w=p_w, p_d=p_d, p_h_prime=p_h_prime, p_w_prime=p_w_prime, p_d_prime=p_d_prime)
        super().__init__(name=name, patch=patch, *args, **kwargs)

__init__(p_h, p_w, p_d, p_h_prime=None, p_w_prime=None, p_d_prime=None, name='cuboid_patch_based_geometric_interdependence', *args, **kwargs)

Initializes the cuboid patch-based geometric interdependence function.

Parameters:

Name Type Description Default
p_h int

Dimensions of the cuboid patch (height, width, depth).

required
p_w int

Dimensions of the cuboid patch (height, width, depth).

required
p_d int

Dimensions of the cuboid patch (height, width, depth).

required
p_h_prime int

Output dimensions of the cuboid patch. Defaults to None.

None
p_w_prime int

Output dimensions of the cuboid patch. Defaults to None.

None
p_d_prime int

Output dimensions of the cuboid patch. Defaults to None.

None
name str

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

'cuboid_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,
    p_h: int, p_w: int, p_d: int,
    p_h_prime: int = None, p_w_prime: int = None, p_d_prime: int = None,
    name: str = 'cuboid_patch_based_geometric_interdependence',
    *args, **kwargs
):
    """
        Initializes the cuboid patch-based geometric interdependence function.

        Parameters
        ----------
        p_h, p_w, p_d : int
            Dimensions of the cuboid patch (height, width, depth).
        p_h_prime, p_w_prime, p_d_prime : int, optional
            Output dimensions of the cuboid patch. Defaults to None.
        name : str, optional
            Name of the interdependence function. Defaults to 'cuboid_patch_based_geometric_interdependence'.
        *args : tuple
            Additional positional arguments for the parent class.
        **kwargs : dict
            Additional keyword arguments for the parent class.
    """
    patch = cuboid(p_h=p_h, p_w=p_w, p_d=p_d, p_h_prime=p_h_prime, p_w_prime=p_w_prime, p_d_prime=p_d_prime)
    super().__init__(name=name, patch=patch, *args, **kwargs)