TrivialWeightEstimator

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#ifndef _TrivialWeightEstimator_H_
#define _TrivialWeightEstimator_H_

#include "CommonTools/Clustering1D/interface/WeightEstimator.h"

#include <vector>

/**
 * \class TrivialWeightEstimator
 *  trivial WeightEstimator that returns 1.
 */
template <class T>
class TrivialWeightEstimator : public WeightEstimator<T> {
public:
  double weight(const std::vector<const T*>&) const override { return 1.0; }

  TrivialWeightEstimator* clone() const override { return new TrivialWeightEstimator<T>(*this); };
};

#endif