SPH
Public Member Functions | List of all members
NegativeMean Class Reference

Generalized mean with negative (runtime) power. More...

#include <Means.h>

Inheritance diagram for NegativeMean:
PositiveMean

Public Member Functions

 NegativeMean (const Float power)
 
INLINE void accumulate (const Float value)
 
INLINE void accumulate (const NegativeMean &other)
 
INLINE Float compute () const
 
- Public Member Functions inherited from PositiveMean
 PositiveMean (const Float power)
 
INLINE void accumulate (const Float value)
 
INLINE void accumulate (const PositiveMean &other)
 
INLINE void reset ()
 
INLINE Float compute () const
 
INLINE Size count () const
 

Additional Inherited Members

- Protected Attributes inherited from PositiveMean
double sum = 0.
 
Size weight = 0
 
Float power
 

Detailed Description

Generalized mean with negative (runtime) power.

Cannot be used to compute geometric mean. If constructed with non-negative power, it issues an assert.

Definition at line 137 of file Means.h.

Constructor & Destructor Documentation

◆ NegativeMean()

NegativeMean::NegativeMean ( const Float  power)
inline

Definition at line 139 of file Means.h.

Member Function Documentation

◆ accumulate() [1/2]

INLINE void NegativeMean::accumulate ( const Float  value)
inline

Definition at line 142 of file Means.h.

◆ accumulate() [2/2]

INLINE void NegativeMean::accumulate ( const NegativeMean other)
inline

Definition at line 153 of file Means.h.

◆ compute()

INLINE Float NegativeMean::compute ( ) const
inline

Definition at line 159 of file Means.h.


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