GaussianFunction


@UnstableApi
class GaussianFunction : ConvolutionFunction1D


Implementation of a symmetric Gaussian function with a limited domain.

The half-width of the domain is sigma times numStdDev. Values strictly outside of that range are zero.

Summary

Public constructors

GaussianFunction(
    sigma: @FloatRange(from = 0.0, fromInclusive = false) Float,
    numStandardDeviations: @FloatRange(from = 0.0, fromInclusive = false) Float
)

Creates an instance.

Public functions

Float

Returns the end of the domain.

Float

Returns the start of the domain.

Boolean
equals(o: Any?)
Int
Float
value(samplePosition: Float)

Returns the value of the function at the samplePosition.

Inherited functions

From androidx.media3.effect.ConvolutionFunction1D
Float

Returns the width of the domain.

Public constructors

GaussianFunction

GaussianFunction(
    sigma: @FloatRange(from = 0.0, fromInclusive = false) Float,
    numStandardDeviations: @FloatRange(from = 0.0, fromInclusive = false) Float
)

Creates an instance.

Parameters
sigma: @FloatRange(from = 0.0, fromInclusive = false) Float

The one standard deviation, in pixels.

numStandardDeviations: @FloatRange(from = 0.0, fromInclusive = false) Float

The half-width of function domain, measured in the number of standard deviations.

Public functions

domainEnd

fun domainEnd(): Float

Returns the end of the domain.

domainStart

fun domainStart(): Float

Returns the start of the domain.

equals

fun equals(o: Any?): Boolean

hashCode

fun hashCode(): Int

value

fun value(samplePosition: Float): Float

Returns the value of the function at the samplePosition.