Opened 6 years ago
Closed 3 years ago
#890 closed request (fixed)
normalize to unity
Reported by: | Peter | Owned by: | Peter |
---|---|---|---|
Priority: | minor | Milestone: | yat 0.18 |
Component: | normalizer | Version: | |
Keywords: | Cc: |
Description
A new normalizer class that multiplies all values in the range with a value such that the sum of values is 1.0 afterwards.
Change History (5)
comment:1 Changed 3 years ago by
Milestone: | yat 0.x+ → yat 0.18 |
---|---|
Priority: | major → minor |
Status: | new → accepted |
comment:2 Changed 3 years ago by
comment:3 Changed 3 years ago by
In C++11 it's possible to have something like
template<typename T = statistics::Average> using Centralizer = RangeNormalizer<std::minus<double>, T>;
In C++98 one seems to forced into inheritance
template<typename T = statistics::Average> class Centralizer : public RangeNormalizer<std::minus<double>, T> {};
and I'm hesitant whether that's a good idea.
Note: See
TracTickets for help on using
tickets.
This is very similar to Centralizer, but instead of subtracting a value from each element, each element is divided by a value. A copy-n-paste with replacing
std::Minus
withstd::Divide
would do it, but would prefer avoiding the the duplicated code, if possible.