template<typename T, typename CountT>
Centroid struct
A centroid in the histogram with a value and count.
Public types
- using CountType = CountT
Constructors, destructors, conversion operators
Public functions
- auto getValue() const -> T
- Get the value.
- auto getCount() const -> CountType
- Get the count.
- void setValue(T in_value)
- Set the value.
- void setCount(CountType in_count)
- Set the count.
- void addCount(CountType in_add)
- Add to the count.
- void merge(Centroid<T, CountT> const& in)
- Merge in another centroid.
- auto isExact() const -> bool
- Return if this centroid is exact or approximated.
-
template<typename SerializerT>void serialize(SerializerT& s)
Friends
Function documentation
template<typename T, typename CountT>
T vt:: util:: adt:: detail:: Centroid<T, CountT>:: getValue() const
Get the value.
Returns | the value (p) |
---|
template<typename T, typename CountT>
void vt:: util:: adt:: detail:: Centroid<T, CountT>:: setValue(T in_value)
Set the value.
Parameters | |
---|---|
in_value in | the value |
template<typename T, typename CountT>
bool vt:: util:: adt:: detail:: Centroid<T, CountT>:: isExact() const
Return if this centroid is exact or approximated.
Returns | whether it is exact |
---|