Skip to content

cylinder_patch_based_geometric_expansion

Bases: geometric_expansion

The cylinder patch based geometric expansion function.

It performs the data expansion based on cylinder geometric patch shapes and provided expansion metric. This class inherits from the geometric_expansion class, and only redefines the initialization method to declare the patch shape and size.

...

Attributes:

Name Type Description
name str, default = 'cylinder_patch_based_geometric_expansion'

Name of the expansion function.

p_r int

Radius of the circular surface of the cylinder shape.

p_d int

Depth of the cylinder patch along the negative direction.

p_d_prime int, default = None

Depth of the cylinder patch along the positive direction.

Methods:

Name Description
__init__

It performs the initialization of the expansion function based on the provided metric and cylinder patch shapes.

Source code in tinybig/expansion/geometric_expansion.py
class cylinder_patch_based_geometric_expansion(geometric_expansion):
    """
        The cylinder patch based geometric expansion function.

        It performs the data expansion based on cylinder geometric patch shapes and provided expansion metric.
        This class inherits from the geometric_expansion class, and only redefines the initialization method
        to declare the patch shape and size.

        ...

        Attributes
        ----------
        name: str, default = 'cylinder_patch_based_geometric_expansion'
            Name of the expansion function.
        p_r: int
            Radius of the circular surface of the cylinder shape.
        p_d: int
            Depth of the cylinder patch along the negative direction.
        p_d_prime: int, default = None
            Depth of the cylinder patch along the positive direction.

        Methods
        ----------
        __init__
            It performs the initialization of the expansion function based on the provided metric and cylinder patch shapes.
    """
    def __init__(
        self,
        p_r: int, p_d: int, p_d_prime: int = None,
        name: str = 'cylinder_patch_based_geometric_expansion',
        *args, **kwargs
    ):
        """
            The initialization method of the cylinder patch based geometric expansion function.

            It initializes the cylinder expansion function based on the provided cylinder patch shape
            of the data segments to be compressed in the provided grid structure.

            Parameters
            ----------
            name: str, default = 'cylinder_patch_based_geometric_expansion'
                Name of the expansion function.
            p_r: int
                Radius of the circular surface of the cylinder shape.
            p_d: int
                Depth of the cylinder patch along the negative direction.
            p_d_prime: int, default = None
                Depth of the cylinder patch along the positive direction.

            Returns
            ----------
            transformation
                The cylinder geometric expansion function.
        """
        patch = cylinder(p_r=p_r, p_d=p_d, p_d_prime=p_d_prime)
        super().__init__(name=name, patch=patch, *args, **kwargs)

__init__(p_r, p_d, p_d_prime=None, name='cylinder_patch_based_geometric_expansion', *args, **kwargs)

The initialization method of the cylinder patch based geometric expansion function.

It initializes the cylinder expansion function based on the provided cylinder patch shape of the data segments to be compressed in the provided grid structure.

Parameters:

Name Type Description Default
name str

Name of the expansion function.

'cylinder_patch_based_geometric_expansion'
p_r int

Radius of the circular surface of the cylinder shape.

required
p_d int

Depth of the cylinder patch along the negative direction.

required
p_d_prime int

Depth of the cylinder patch along the positive direction.

None

Returns:

Type Description
transformation

The cylinder geometric expansion function.

Source code in tinybig/expansion/geometric_expansion.py
def __init__(
    self,
    p_r: int, p_d: int, p_d_prime: int = None,
    name: str = 'cylinder_patch_based_geometric_expansion',
    *args, **kwargs
):
    """
        The initialization method of the cylinder patch based geometric expansion function.

        It initializes the cylinder expansion function based on the provided cylinder patch shape
        of the data segments to be compressed in the provided grid structure.

        Parameters
        ----------
        name: str, default = 'cylinder_patch_based_geometric_expansion'
            Name of the expansion function.
        p_r: int
            Radius of the circular surface of the cylinder shape.
        p_d: int
            Depth of the cylinder patch along the negative direction.
        p_d_prime: int, default = None
            Depth of the cylinder patch along the positive direction.

        Returns
        ----------
        transformation
            The cylinder geometric expansion function.
    """
    patch = cylinder(p_r=p_r, p_d=p_d, p_d_prime=p_d_prime)
    super().__init__(name=name, patch=patch, *args, **kwargs)