Skip to content

Noise

BufferedAlphaNoise

Create a buffer of alpha noise generator. Alpha can be in [0, 2].

Source code in cmtj/noise/__init__.pyi
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class BufferedAlphaNoise:
    """Create a buffer of alpha noise generator. Alpha can be in [0, 2]."""

    def __init__(self, bufferSize: int, alpha: float, std: float, scale: float) -> None: ...
    def fillBuffer(self) -> None:
        """Fill the buffer with the noise. This method is called only once."""
        ...

    def tick(self) -> float:
        """Produce the next sample of the noise."""
        ...

fillBuffer()

Fill the buffer with the noise. This method is called only once.

Source code in cmtj/noise/__init__.pyi
7
8
9
def fillBuffer(self) -> None:
    """Fill the buffer with the noise. This method is called only once."""
    ...

tick()

Produce the next sample of the noise.

Source code in cmtj/noise/__init__.pyi
11
12
13
def tick(self) -> float:
    """Produce the next sample of the noise."""
    ...

VectorAlphaNoise

Create a vector alpha noise generator. Alpha can be in [0, 2].

Source code in cmtj/noise/__init__.pyi
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class VectorAlphaNoise:
    """Create a vector alpha noise generator. Alpha can be in [0, 2]."""

    def __init__(
        self,
        bufferSize: int,
        alpha: float,
        std: float,
        scale: float,
        axis: cmtj.Axis = cmtj.Axis.all,
    ) -> None:
        """Kasdin algorithm for vector alpha noise generation.

        :param bufferSize: Buffer size
        :param alpha: Alpha parameter
        :param std: Standard deviation
        :param scale: Scale
        :param axis: Axis, by default all axes are used
        """
        ...

    def getPrevSample(self) -> cmtj.CVector:
        """Get the previous sample of the noise in a vector form."""
        ...

    def getScale(self) -> float:
        """Get the scale of the noise."""
        ...

    def tick(self) -> float: ...
    def tickVector(self) -> cmtj.CVector:
        """Get the next sample of the noise in a vector form."""
        ...

__init__(bufferSize, alpha, std, scale, axis=cmtj.Axis.all)

Kasdin algorithm for vector alpha noise generation.

Parameters:

Name Type Description Default
bufferSize int

Buffer size

required
alpha float

Alpha parameter

required
std float

Standard deviation

required
scale float

Scale

required
axis cmtj.Axis

Axis, by default all axes are used

cmtj.Axis.all
Source code in cmtj/noise/__init__.pyi
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def __init__(
    self,
    bufferSize: int,
    alpha: float,
    std: float,
    scale: float,
    axis: cmtj.Axis = cmtj.Axis.all,
) -> None:
    """Kasdin algorithm for vector alpha noise generation.

    :param bufferSize: Buffer size
    :param alpha: Alpha parameter
    :param std: Standard deviation
    :param scale: Scale
    :param axis: Axis, by default all axes are used
    """
    ...

getPrevSample()

Get the previous sample of the noise in a vector form.

Source code in cmtj/noise/__init__.pyi
36
37
38
def getPrevSample(self) -> cmtj.CVector:
    """Get the previous sample of the noise in a vector form."""
    ...

getScale()

Get the scale of the noise.

Source code in cmtj/noise/__init__.pyi
40
41
42
def getScale(self) -> float:
    """Get the scale of the noise."""
    ...

tickVector()

Get the next sample of the noise in a vector form.

Source code in cmtj/noise/__init__.pyi
45
46
47
def tickVector(self) -> cmtj.CVector:
    """Get the next sample of the noise in a vector form."""
    ...