|
static auto | random () -> double |
| Get a random value. More...
|
|
static auto | degree_to_radian (double) -> double |
| Convert degree to radian. More...
|
|
static auto | radian_to_degree (double) -> double |
| Convert radian to degree. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | minimum (const _Cont &container) -> IndexPair< T > |
| Calculate minimum value with its index. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | maximum (const _Cont &container) -> IndexPair< T > |
| Calculate maximum value with its index. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | mean (const _Cont &container) -> double |
| Calculate average. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | median (const _Cont &container) -> double |
| Get median value. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | mode (const _Cont &container) -> T |
| Find mode value. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | stdev_p (const _Cont &container) -> double |
| Square root of a variance_p. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | stdev_s (const _Cont &container) -> double |
| Square root of a variance_s. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | variance_p (const _Cont &container) -> double |
| Calculate standard deviation for all population. More...
|
|
template<typename _Cont , typename T = _Cont::value_type> |
static auto | variance_s (const _Cont &container) -> double |
| Calculate variance for sample. More...
|
|
Utility of Math.
Provides some static values and mathmatical methods.
- See also
- samchon::library
- Author
- Jeongho Nam http://samchon.org
Definition at line 23 of file Math.hpp.
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::minimum |
( |
const _Cont & |
container | ) |
-> IndexPair<T>
|
|
inlinestatic |
Calculate minimum value with its index.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its minimum value |
- Returns
- Pair of minimum value and its index
Definition at line 143 of file Math.hpp.
Referenced by samchon::library::StringUtil::substituteSQL().
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::maximum |
( |
const _Cont & |
container | ) |
-> IndexPair<T>
|
|
inlinestatic |
Calculate maximum value with its index.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its minimum value |
- Returns
- Pair of maximum value and its index
Definition at line 174 of file Math.hpp.
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::mean |
( |
const _Cont & |
container | ) |
-> double
|
|
inlinestatic |
Calculate average.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its mean |
- Returns
- Average(mean) of the contaier
Definition at line 205 of file Math.hpp.
Referenced by variance_p(), and variance_s().
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::median |
( |
const _Cont & |
container | ) |
-> double
|
|
inlinestatic |
Get median value.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its median |
- Returns
- Median value of the container
Definition at line 226 of file Math.hpp.
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::mode |
( |
const _Cont & |
container | ) |
-> T
|
|
inlinestatic |
Find mode value.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its mode |
- Returns
- Most appeared value in the container
Definition at line 258 of file Math.hpp.
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::stdev_p |
( |
const _Cont & |
container | ) |
-> double
|
|
inlinestatic |
Square root of a variance_p.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its standard deviation |
- Returns
- Standard deviation of the container
Definition at line 282 of file Math.hpp.
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::stdev_s |
( |
const _Cont & |
container | ) |
-> double
|
|
inlinestatic |
Square root of a variance_s.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its variance |
- Returns
- Variance of the container
Definition at line 293 of file Math.hpp.
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::variance_p |
( |
const _Cont & |
container | ) |
-> double
|
|
inlinestatic |
Calculate standard deviation for all population.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its standard deviation |
- Returns
- Standard deviation of the container
Definition at line 310 of file Math.hpp.
References mean().
template<typename _Cont , typename T = _Cont::value_type>
static auto samchon::library::Math::variance_s |
( |
const _Cont & |
container | ) |
-> double
|
|
inlinestatic |
Calculate variance for sample.
- Template Parameters
-
_Cont | Type of the container |
_Ty | |
Value type of the container.
Do not modify the default template argument.
- Parameters
-
container | Container to find its variance |
- Returns
- Variance of the container
Definition at line 333 of file Math.hpp.
References mean().