As an example, consider a binary functor $$f_{0} and two functors $$f_{1} and $$f_{2}, with arity three and two, respectively. Composing $$f_{1} and $$f_{2} into $$f_{0} yields a new functor
$$ f:(x_{0},x_{1},x_{2},x_{3},x_{4}) f_{0}(f_{1}(x_{0},x_{1},x_{2}),f_{2}(x_{3},x_{4}))
with arity five.
#include <CGAL/functional.h>
| ||
| ||
| ||
returns the functor
f0(f1($$ · )) with the same arity as f1. Requirement: f0 is unary function (arity 1). f0 and f1 are models for AdaptableFunctor. | ||
| ||
| ||
| ||
returns the functor
f0(f1($$ · ),$$f2($$ · )) with arity equal
to $$ar(f1)+ar(f2). Requirement: f0 is binary function (arity 2). f0, f1, and f2 are models for AdaptableFunctor. | ||
| ||
| ||
| ||
returns the functor
f0(f1($$ · ),$$f2($$ · ),$$f3($$ · ))
with arity equal to $$ar(f1)+ar(f2)+ar(f3). Requirement: f0 is ternary function (arity 3). f0, f1, f2, and f3 are models for AdaptableFunctor. |