Weight accessor that always returns 1. More...

`#include <weight_accessor.hpp>`

## Public Member Functions | |

WeightType | operator() (ElementType const &e) const |

Functor implementation. |

struct trsl::weight_accessor< WeightType, ElementType >

Weight accessor that always returns 1.

This accessor can be passed to sample from a population of equal-weight elements. The total weight of the population should naturally be set to the number of elements in the population. This accessor is of type *functor*, see Accessors for more details.

Definition at line 23 of file weight_accessor.hpp.

template<typename WeightType , typename ElementType >

WeightType trsl::weight_accessor< WeightType, ElementType >::operator() | ( | ElementType const & | e |
) | const` [inline]` |

The documentation for this struct was generated from the following file:

© Copyright 2007-2011 Renaud Detry.

Distributed under the Boost Software License, Version 1.0.

(See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt.)

Revised Wed Apr 6 16:30:07 2011.

Distributed under the Boost Software License, Version 1.0.

(See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt.)

Revised Wed Apr 6 16:30:07 2011.