AuxPort 0.2
Modules for Audio Software Development
Loading...
Searching...
No Matches
AuxPort::Error< errorVal > Class Template Reference

This class provides an interface to calculate different types of errors. More...

#include <AuxMath.h>

Public Types

enum class  Type { Mean , Absolute , Relative , RMSE }
 This specifies the type of error. More...
 

Public Member Functions

 Error ()
 Initializes error class with default type (Absolute Error).
 
 Error (const Error &error)=default
 
void setType (const Type &type)
 Sets the type of error.
 
float compute (const std::vector< errorVal > &calculatedValues, const std::vector< errorVal > &expectedValues)
 Returns the error between provided vectors. Each value in the first vector will be compared with the corresponding values in the second vector, and the error will be computed based on the current error type.
 

Detailed Description

template<class errorVal>
class AuxPort::Error< errorVal >

This class provides an interface to calculate different types of errors.

Definition at line 52 of file AuxMath.h.

Member Enumeration Documentation

◆ Type

template<class errorVal >
enum class AuxPort::Error::Type
strong

This specifies the type of error.

Definition at line 58 of file AuxMath.h.

Constructor & Destructor Documentation

◆ Error()

template<class errorVal >
AuxPort::Error< errorVal >::Error ( )
inline

Initializes error class with default type (Absolute Error).

Definition at line 63 of file AuxMath.h.

Member Function Documentation

◆ compute()

template<class errorVal >
float AuxPort::Error< errorVal >::compute ( const std::vector< errorVal > & calculatedValues,
const std::vector< errorVal > & expectedValues )
inline

Returns the error between provided vectors. Each value in the first vector will be compared with the corresponding values in the second vector, and the error will be computed based on the current error type.

Definition at line 85 of file AuxMath.h.

◆ setType()

template<class errorVal >
void AuxPort::Error< errorVal >::setType ( const Type & type)
inline

Sets the type of error.

Definition at line 75 of file AuxMath.h.


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