Adobe Systems Incorporated


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:
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
Valid Expressions:
Expression Semantics:
Complexity Guarantees:
  • The expression f(x) is not permitted to change f's state.
Type(s) Modeling this Concept:
See Also:
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.
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.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google