Mass center accumulator.
More...
#include <center.hh>
Inherits mln::accu::internal::base< V, center< P, V > >.
|
| bool | is_valid () const |
| | Check whether this accu is able to return a result.
|
| |
| unsigned | nsites () const |
| | Return the number of sites taken in consideration.
|
| |
| void | take_as_init (const T &t) |
| | Take as initialization the value t.
|
| |
| void | take_n_times (unsigned n, const T &t) |
| | Take n times the value t.
|
| |
| V | to_result () const |
| | Get the value of the accumulator.
|
| |
|
| void | init () |
| | Manipulators.
|
| |
template<typename P, typename V = typename P::vec>
struct mln::accu::center< P, V >
Mass center accumulator.
- Template Parameters
-
| P | the type of site. |
| V | the type of vector to be used as result. The default vector type is the one provided by P. |
Definition at line 55 of file center.hh.
template<typename P , typename V >
template<typename P , typename V >
Check whether this accu is able to return a result.
Definition at line 160 of file center.hh.
template<typename P , typename V >
Return the number of sites taken in consideration.
Definition at line 168 of file center.hh.
Take as initialization the value t.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
Take n times the value t.
Dev note: this is a final method; override if needed by take_as_init_ (ending with '_').
template<typename P , typename V >
Get the value of the accumulator.
Definition at line 142 of file center.hh.