|
Samchon Framework for CPP
1.0.0
|
#include <Math.hpp>
Static Public Member Functions | |
| static auto | E () -> double |
| Exponent. More... | |
| static auto | PI () -> double |
| ¥ð, Number Pi More... | |
| static auto | LN2 () -> double |
| loge2 More... | |
| static auto | LN10 () -> double |
| loge10 More... | |
| static auto | LOG2E () -> double |
| log2e More... | |
| static auto | LOG10E () -> double |
| log10e More... | |
| static auto | SQRT1_2 () -> double |
| Squart root of 0.5. More... | |
| static auto | SQRT2 () -> double |
| Squart root of 2. More... | |
| static auto | random () -> double |
| Get a random value. More... | |
| static auto | degree_to_radian (double val) -> double |
| Convert degree to radian. More... | |
| static auto | radian_to_degree (double val) -> 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... | |
|
inlinestatic |
|
inlinestatic |
¥ð, Number Pi
A mathematical constant for the ratio of the circumference of a circle to its diameter, expressed as pi, with a value of 3.141592653589793.
Definition at line 47 of file Math.hpp.
Referenced by degree_to_radian(), and radian_to_degree().

|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
log10e
A mathematical constant for the base-10 logarithm of the constant e (Math.E), expressed as log10e, with an approximate value of 0.4342944819032518. The Math.log() method computes the natural logarithm of a number. Multiply the result of Math.log() by Math.LOG10E to obtain the base-10 logarithm.
Definition at line 97 of file Math.hpp.
References E().

|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Get a random value.
Returns a random value following uniform distribution
Definition at line 135 of file Math.hpp.
Referenced by samchon::library::GeneticAlgorithm< GeneArray, Compare >::crossover(), samchon::examples::tsp::GeometryPoint::GeometryPoint(), samchon::library::GeneticAlgorithm< GeneArray, Compare >::mutate(), and samchon::library::GeneticAlgorithm< GeneArray, Compare >::selection().

|
inlinestatic |
Convert degree to radian.
Definition at line 149 of file Math.hpp.
References PI().
Referenced by samchon::examples::tsp::GeometryPoint::calcDistance().


|
inlinestatic |
Convert radian to degree.
Definition at line 157 of file Math.hpp.
References PI().
Referenced by samchon::examples::tsp::GeometryPoint::calcDistance().


|
inlinestatic |
Calculate minimum value with its index.
| _Cont | Type of the container |
| _Ty |
Value type of the container.
Do not modify the default template argument.
| container | Container to find its minimum value |
Definition at line 177 of file Math.hpp.
Referenced by samchon::WeakString::finds(), samchon::WeakString::rtrim(), and samchon::library::StringUtil::substituteSQL().

|
inlinestatic |
Calculate maximum value with its index.
| _Cont | Type of the container |
| _Ty |
Value type of the container.
Do not modify the default template argument.
| container | Container to find its minimum value |
Definition at line 208 of file Math.hpp.
Referenced by samchon::WeakString::rfinds(), and samchon::WeakString::rtrim().

|
inlinestatic |
Calculate average.
| _Cont | Type of the container |
| _Ty |
Value type of the container.
Do not modify the default template argument.
| container | Container to find its mean |
Definition at line 239 of file Math.hpp.
Referenced by variance_p(), and variance_s().

|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Square root of a variance_p.
| _Cont | Type of the container |
| _Ty |
Value type of the container.
Do not modify the default template argument.
| container | Container to find its standard deviation |
Definition at line 316 of file Math.hpp.
References variance_p().

|
inlinestatic |
Square root of a variance_s.
| _Cont | Type of the container |
| _Ty |
Value type of the container.
Do not modify the default template argument.
| container | Container to find its variance |
Definition at line 327 of file Math.hpp.
References variance_s().

|
inlinestatic |
Calculate standard deviation for all population.
| _Cont | Type of the container |
| _Ty |
Value type of the container.
Do not modify the default template argument.
| container | Container to find its standard deviation |
Definition at line 344 of file Math.hpp.
References mean().
Referenced by stdev_p().


|
inlinestatic |
Calculate variance for sample.
| _Cont | Type of the container |
| _Ty |
Value type of the container.
Do not modify the default template argument.
| container | Container to find its variance |
Definition at line 367 of file Math.hpp.
References mean().
Referenced by stdev_s().

