DotNetDupe 5.0.4
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
Statistics.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include "Common.h"
10
11namespace DotNetDupe {
12 namespace System {
13 namespace Numerics {
14
20 class Statistics {
21 public:
23 DOTNETDUPE_API static double Mean(const Collections::Generic::List<double>& listValues);
24
26 DOTNETDUPE_API static double Variance(const Collections::Generic::List<double>& listValues, bool bIsSample = false);
27
29 DOTNETDUPE_API static double StandardDeviation(const Collections::Generic::List<double>& listValues, bool bIsSample = false);
30
32 DOTNETDUPE_API static double StdDev(const Collections::Generic::List<double>& listValues, bool bIsSample = false);
33
35 DOTNETDUPE_API static double MovingAverage(const Collections::Generic::List<double>& listValues, int iPeriod);
36
39
41 DOTNETDUPE_API static double ExponentialMovingAverage(const Collections::Generic::List<double>& listValues, int iPeriod, double dSmoothing = 2.0);
42
45 };
46
47 }
48 }
49}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Represents a strongly typed list of objects that can be accessed by index mirroring ....
Represents a strongly typed list of objects accessible by index.
Definition List.h:31
Provides static methods for mean, variance, standard deviation, and moving averages.
Definition Statistics.h:20
static double StandardDeviation(const Collections::Generic::List< double > &listValues, bool bIsSample=false)
Computes the standard deviation of a sequence of double values.
static Collections::Generic::List< double > MovingAverageSeries(const Collections::Generic::List< double > &listValues, int iPeriod)
Computes the rolling simple moving average (SMA) series across all values.
static double MovingAverage(const Collections::Generic::List< double > &listValues, int iPeriod)
Computes the simple moving average (SMA) over the final window of length iPeriod.
static double Variance(const Collections::Generic::List< double > &listValues, bool bIsSample=false)
Computes the variance of a sequence of double values.
static Collections::Generic::List< double > ExponentialMovingAverageSeries(const Collections::Generic::List< double > &listValues, int iPeriod, double dSmoothing=2.0)
Computes the rolling exponential moving average (EMA) series across the sequence.
static double StdDev(const Collections::Generic::List< double > &listValues, bool bIsSample=false)
Computes the standard deviation of a sequence of double values (abbreviated alias).
static double ExponentialMovingAverage(const Collections::Generic::List< double > &listValues, int iPeriod, double dSmoothing=2.0)
Computes the exponential moving average (EMA) value for the sequence.
static double Mean(const Collections::Generic::List< double > &listValues)
Computes the arithmetic mean of a sequence of double values.
Definition Statistics.cpp:9