Concept

Kinetic::FunctionKernel::Function

Definition

The concept Kinetic::FunctionKernel::Function represents a function.

Types

Kinetic::FunctionKernel::Function::NT
The number type used in describing the function.


Kinetic::FunctionKernel::Function a ( NT);
Construct a constant function from a number.

Operations

NT a ( NT ) Evaluate the function at an NT.

See Also

FunctionKernel, FunctionKernel::ConstructFunction

Example

Several ways to create functions:

Using Kinetic::ConstructFunction:

Traits::Function_kernel::Construct_function cf= traits.function_kernel_object().construct_function_object();
Traits::Kinetic_kernel::Motion_function x= cf(0.0,1.0,2.0);
Traits::Kinetic_kernel::Motion_function y= cf(0.0,1.0,2.0);
Traits::Kinetic_kernel::Point_2 pt(x,y);

Using the constructor:

double coefs[]={1.0, 2.0, 3.0};
Traits::Kinetic_kernel::Motion_function z(coefs, coefs+3);

Using ring operations:

Traits::Kinetic_kernel::Motion_function z= x*z+y;