| 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>`