| Home | Libraries | People | FAQ | More

##### for_each_segment

Applies function f to each segment.

###### Description

Applies a function f (functor, having operator() defined) to each segment making up the geometry

###### Synopsis

    template<typename Geometry, typename Functor>
    Functor for_each_segment(Geometry & geometry, Functor f)

###### Parameters

Type | Concept | Name | Description
--- | --- | --- | ---
Geometry & | Any type fulfilling a Geometry Concept | geometry | A model of the specified concept
Functor | Function or class with operator() | f | Unary function, taking a segment as argument

###### Header

Either

`#include <boost/geometry/geometry.hpp>`

Or

`#include <boost/geometry/algorithms/for_each.hpp>`

###### Conformance

The function for_each_segment is not defined by OGC.

The function for_each_segment conforms to the std::for_each function of the C++ std-library.