# GaussianFunction

# GaussianFunction

Artifact:[androidx.media3:media3-effect](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/effect/GaussianFunction.java+class:androidx.media3.effect.GaussianFunction)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/effect/GaussianFunction "View this page in Java")

<br />

```
@UnstableApi
class GaussianFunction : ConvolutionFunction1D
```

<br />

*** ** * ** ***

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](https://developer.android.com/reference/kotlin/androidx/media3/effect/GaussianFunction#GaussianFunction(float,float))`(` ` sigma: @`[FloatRange](https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange)`(from = 0.0, fromInclusive = false) `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`,` ` numStandardDeviations: @`[FloatRange](https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange)`(from = 0.0, fromInclusive = false) `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) `)` Creates an instance. |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)     | [domainEnd](https://developer.android.com/reference/kotlin/androidx/media3/effect/GaussianFunction#domainEnd())`()` Returns the end of the domain.                                                                                                                          |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)     | [domainStart](https://developer.android.com/reference/kotlin/androidx/media3/effect/GaussianFunction#domainStart())`()` Returns the start of the domain.                                                                                                                    |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/media3/effect/GaussianFunction#equals(java.lang.Object))`(o: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                              |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/androidx/media3/effect/GaussianFunction#hashCode())`()`                                                                                                                                                           |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)     | [value](https://developer.android.com/reference/kotlin/androidx/media3/effect/GaussianFunction#value(float))`(samplePosition: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` Returns the value of the function at the`samplePosition`. |

|                                                                                                                                                                                                                                                                                                     ### Inherited functions                                                                                                                                                                                                                                                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.media3.effect.ConvolutionFunction1D](https://developer.android.com/reference/kotlin/androidx/media3/effect/ConvolutionFunction1D) |---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| | [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [width](https://developer.android.com/reference/kotlin/androidx/media3/effect/ConvolutionFunction1D#width())`()` 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](https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange)`(from = 0.0, fromInclusive = false) `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                 | The one standard deviation, in pixels.                                            |
| `numStandardDeviations: @`[FloatRange](https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange)`(from = 0.0, fromInclusive = false) `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | 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`.