trsl logo

trsl::weight_accessor< WeightType, ElementType > Struct Template Reference

Weight accessor that always returns 1. More...

#include <weight_accessor.hpp>

List of all members.

Public Member Functions

WeightType operator() (ElementType const &e) const
 Functor implementation.

Detailed Description

template<typename WeightType, typename ElementType>
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.

Member Function Documentation

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

Functor implementation.


Definition at line 30 of file weight_accessor.hpp.

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
Revised Wed Apr 6 16:30:07 2011. Logo