Descriptives Struct Reference

This structure contains the simplest Descriptives for a set, variable, etc. It includes : More...

#include <statistics.h>

Public Member Functions

 Descriptives ()
 Default constructor. More...
 
 Descriptives (const type &, const type &, const type &, const type &)
 Values constructor. More...
 
virtual ~Descriptives ()
 Destructor. More...
 
void set (const type &, const type &, const type &, const type &)
 
void set_minimum (const type &)
 
void set_maximum (const type &)
 
void set_mean (const type &)
 
void set_standard_deviation (const type &)
 
Tensor< type, 1 > to_vector () const
 
bool has_minimum_minus_one_maximum_one ()
 
bool has_mean_zero_standard_deviation_one ()
 
void save (const string &file_name) const
 
void print (const string &="Descriptives:") const
 Print the tittle of descriptives structure. More...
 

Public Attributes

string name
 Name of variable. More...
 
type minimum = type(0)
 Smallest value of a set, function, etc. More...
 
type maximum = type(0)
 Biggest value of a set, function, etc. More...
 
type mean = type(0)
 Mean value of a set, function, etc. More...
 
type standard_deviation = type(0)
 Standard deviation value of a set, function, etc. More...
 

Detailed Description

This structure contains the simplest Descriptives for a set, variable, etc. It includes :

  • Minimum.
  • Maximum.
  • Mean.
  • Standard Deviation.

Definition at line 40 of file statistics.h.

Constructor & Destructor Documentation

◆ Descriptives() [1/2]

Descriptives ( )
explicit

Default constructor.

Definition at line 16 of file statistics.cpp.

◆ Descriptives() [2/2]

Descriptives ( const type &  new_minimum,
const type &  new_maximum,
const type &  new_mean,
const type &  new_standard_deviation 
)
explicit

Values constructor.

Definition at line 28 of file statistics.cpp.

◆ ~Descriptives()

~Descriptives ( )
virtual

Destructor.

Definition at line 41 of file statistics.cpp.

Member Function Documentation

◆ has_mean_zero_standard_deviation_one()

bool has_mean_zero_standard_deviation_one ( )

Returns true if the mean value is 0 and the standard deviation value is 1, and false otherwise.

Definition at line 125 of file statistics.cpp.

◆ has_minimum_minus_one_maximum_one()

bool has_minimum_minus_one_maximum_one ( )

Returns true if the minimum value is -1 and the maximum value is +1, and false otherwise.

Definition at line 111 of file statistics.cpp.

◆ print()

void print ( const string &  title = "Descriptives:") const

Print the tittle of descriptives structure.

Definition at line 140 of file statistics.cpp.

◆ save()

void save ( const string &  file_name) const

Saves to a file the minimum, maximum, mean and standard deviation of the descriptives structure.

Parameters
file_nameName of descriptives data file.

Definition at line 181 of file statistics.cpp.

◆ set()

void set ( const type &  new_minimum,
const type &  new_maximum,
const type &  new_mean,
const type &  new_standard_deviation 
)

Definition at line 45 of file statistics.cpp.

◆ set_maximum()

void set_maximum ( const type &  new_maximum)

Sets a new maximum value in the descriptives structure.

Parameters
new_maximumMaximum value.

Definition at line 67 of file statistics.cpp.

◆ set_mean()

void set_mean ( const type &  new_mean)

Sets a new mean value in the descriptives structure.

Parameters
new_meanMean value.

Definition at line 76 of file statistics.cpp.

◆ set_minimum()

void set_minimum ( const type &  new_minimum)

Sets a new minimum value in the descriptives structure.

Parameters
new_minimumMinimum value.

Definition at line 58 of file statistics.cpp.

◆ set_standard_deviation()

void set_standard_deviation ( const type &  new_standard_deviation)

Sets a new standard deviation value in the descriptives structure.

Parameters
new_standard_deviationStandard deviation value.

Definition at line 85 of file statistics.cpp.

◆ to_vector()

Tensor< type, 1 > to_vector ( ) const

Returns all the statistical parameters contained in a single vector. The size of that vector is four. The elements correspond to the minimum, maximum, mean and standard deviation values respectively.

Definition at line 96 of file statistics.cpp.

Member Data Documentation

◆ maximum

type maximum = type(0)

Biggest value of a set, function, etc.

Definition at line 86 of file statistics.h.

◆ mean

type mean = type(0)

Mean value of a set, function, etc.

Definition at line 90 of file statistics.h.

◆ minimum

type minimum = type(0)

Smallest value of a set, function, etc.

Definition at line 82 of file statistics.h.

◆ name

string name

Name of variable.

Definition at line 78 of file statistics.h.

◆ standard_deviation

type standard_deviation = type(0)

Standard deviation value of a set, function, etc.

Definition at line 94 of file statistics.h.


The documentation for this struct was generated from the following files: