<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/UniformRandomIntegerParameter",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents29UniformRandomIntegerParameterC"
  },
  "title" : "UniformRandomIntegerParameter"
}
-->

# UniformRandomIntegerParameter

Applies the transformer with a randomly generated input parameter.

```
final class UniformRandomIntegerParameter<RandomTransformer, Parameter> where RandomTransformer : RandomTransformer, Parameter : FixedWidthInteger, RandomTransformer.Input == RandomTransformer.Output
```

## Overview

The parameter is chosen from a discrete uniform distribution in the specified range.

Note that a new transformer is created every time this transformer is applied.
This may cause performance issues if the embedded transformer creation is costly.

## Topics

### Creating a transformer

[`init(range:_:)`](/documentation/CreateMLComponents/UniformRandomIntegerParameter/init(range:_:))

Creates a Random Parameter transformer.

### Getting the range

[`var range: Range<Parameter>`](/documentation/CreateMLComponents/UniformRandomIntegerParameter/range)

The range of a random number to use as input to the transformer.

### Applying

[`func applied(to: RandomTransformer.Input, generator: inout some RandomNumberGenerator, eventHandler: EventHandler?) async throws -> RandomTransformer.Output`](/documentation/CreateMLComponents/UniformRandomIntegerParameter/applied(to:generator:eventHandler:))

Performs the random apply operation on the input.

## Relationships

### Conforms To

[`RandomTransformer`](/documentation/CreateMLComponents/RandomTransformer)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)