---
title: "applied(to:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/ordinalencoder/transformer/applied(to:eventhandler:)"
---

# applied(to:eventHandler:)

Performs an ordinal encoding on a single input.

## Declaration

```swift
func applied(to input: Category?, eventHandler: EventHandler? = nil) throws -> Int
```

## Parameters

- `input`: A category to encode.
- `eventHandler`: An event handler.

## Return Value

Return Value A ordinal encoded value.

## See Also

### Applying the transformation

- [applied(_:eventHandler:)](createmlcomponents/ordinalencoder/transformer/applied(_:eventhandler:).md)
