## TransformFunction |

## Detailed Description

A transformation (or transform) function is simply a Unary Function without side effects. That is, the use of the Unary Function does not change the state of the function object. For some algorithms it is required that the transform function return a writable result - in this case it must return a reference.

**Refinement Of:**- UnaryFunction

**Associated Types:**

**Notation:**`F`

A type that is a model of TransformFunction `X`

Argument type of F `Result`

Result type of F `f`

Object of type `F`

`x`

Object of type `X`

**Definitions:**

**Valid Expressions:**

**Expression Semantics:**

**Complexity Guarantees:**

**Invariants:**- The expression
`f(x)`

is*not*permitted to change`f`

's state.

- The expression

**Type(s) Modeling this Concept:**

**Notes:**

**See Also:**

**Example:**- Transform functions are typically used for the conversion of one type to another. An example: transforming a 3-space point into a 2-space point through a projection matrix; the projection matrix is the transform function, and its use does not modify the matrix.

**Example:**- Another use of transform functions is to obtain an ordinal value for a complex data type. An example: Using a single member variable as the ordinal value for a class with several member variables, and sorting a vector of instances based on this ordinal value. The transformation only obtains the ordinal value and is not modified in any way.