CellModules
std Namespace Reference

Provides common mathematical functions and vector operations. More...

Classes

struct  hash< MecaCell::ordered_pair< T > >
 
struct  hash< MecaCell::Vector3D >
 
struct  hash< mingw_stdthread::thread::id >
 
struct  hash< nlohmann::json >
 hash value for JSON objects More...
 
struct  hash< pair< T, U > >
 
struct  less< ::nlohmann::detail::value_t >
 
class  tuple_element< N, ::nlohmann::detail::iteration_proxy_value< IteratorType > >
 
class  tuple_size<::nlohmann::detail::iteration_proxy_value< IteratorType > >
 
class  vector
 A simple vector class template. More...
 

Functions

double log10 (double x)
 Computes the base-10 logarithm of a number. More...
 
double exp (double x)
 Computes the exponential function of a number. More...
 
double sqrt (double x)
 Computes the square root of a number. More...
 
double pow (double base, double exponent)
 Computes the power of a number. More...
 
double sin (double x)
 Computes the sine of a number. More...
 
double cos (double x)
 Computes the cosine of a number. More...
 
double tan (double x)
 Computes the tangent of a number. More...
 
int abs (int x)
 Computes the absolute value of an integer. More...
 
double fabs (double x)
 Computes the absolute value of a floating-point number. More...
 
double log (double x)
 Computes the natural logarithm of a number. More...
 
double acos (double x)
 Computes the arc cosine of a number. More...
 
double asin (double x)
 Computes the arc sine of a number. More...
 
double atan (double x)
 Computes the arc tangent of a number. More...
 
double atan2 (double y, double x)
 Computes the arc tangent of y/x. More...
 
double cosh (double x)
 Computes the hyperbolic cosine of a number. More...
 
double sinh (double x)
 Computes the hyperbolic sine of a number. More...
 
double tanh (double x)
 Computes the hyperbolic tangent of a number. More...
 
double ceil (double x)
 Computes the ceiling of a number. More...
 
double floor (double x)
 Computes the floor of a number. More...
 
double fmod (double x, double y)
 Computes the remainder of the division of two numbers. More...
 
double cbrt (double x)
 Computes the cube root of a number. More...
 
template<class RandomIt >
void shuffle (RandomIt first, RandomIt last)
 Shuffles the elements in a range. More...
 
double acosh (double x)
 Computes the hyperbolic arc cosine of a number. More...
 
double asinh (double x)
 Computes the hyperbolic arc sine of a number. More...
 
double atanh (double x)
 Computes the hyperbolic arc tangent of a number. More...
 
double clamp (double x, double min, double max)
 Clamps a value between a minimum and maximum. More...
 
double max (double a, double b)
 Computes the maximum of two numbers. More...
 
double min (double a, double b)
 Computes the minimum of two numbers. More...
 
template<>
void swap< nlohmann::json > (nlohmann::json &j1, nlohmann::json &j2) noexcept(is_nothrow_move_constructible< nlohmann::json >::value and is_nothrow_move_assignable< nlohmann::json >::value)
 exchanges the values of two JSON objects More...
 

Variables

iostream cout
 Standard output stream. More...
 
iostream endl
 End-of-line manipulator. More...
 
iostream cerr
 Standard error stream. More...
 

Detailed Description

Provides common mathematical functions and vector operations.

Function Documentation

◆ abs()

int std::abs ( int  x)

Computes the absolute value of an integer.

Parameters
xValue.
Returns
Absolute value of the integer.

Definition at line 83 of file std.hpp.

◆ acos()

double std::acos ( double  x)

Computes the arc cosine of a number.

Parameters
xValue.
Returns
Arc cosine of the value.

Definition at line 113 of file std.hpp.

◆ acosh()

double std::acosh ( double  x)

Computes the hyperbolic arc cosine of a number.

Parameters
xValue.
Returns
Hyperbolic arc cosine of the value.

Definition at line 237 of file std.hpp.

◆ asin()

double std::asin ( double  x)

Computes the arc sine of a number.

Parameters
xValue.
Returns
Arc sine of the value.

Definition at line 123 of file std.hpp.

◆ asinh()

double std::asinh ( double  x)

Computes the hyperbolic arc sine of a number.

Parameters
xValue.
Returns
Hyperbolic arc sine of the value.

Definition at line 247 of file std.hpp.

◆ atan()

double std::atan ( double  x)

Computes the arc tangent of a number.

Parameters
xValue.
Returns
Arc tangent of the value.

Definition at line 133 of file std.hpp.

◆ atan2()

double std::atan2 ( double  y,
double  x 
)

Computes the arc tangent of y/x.

Parameters
yValue.
xValue.
Returns
Arc tangent of y/x.

Definition at line 144 of file std.hpp.

◆ atanh()

double std::atanh ( double  x)

Computes the hyperbolic arc tangent of a number.

Parameters
xValue.
Returns
Hyperbolic arc tangent of the value.

Definition at line 257 of file std.hpp.

◆ cbrt()

double std::cbrt ( double  x)

Computes the cube root of a number.

Parameters
xValue.
Returns
Cube root of the value.

Definition at line 215 of file std.hpp.

◆ ceil()

double std::ceil ( double  x)

Computes the ceiling of a number.

Parameters
xValue.
Returns
Ceiling of the value.

Definition at line 184 of file std.hpp.

◆ clamp()

double std::clamp ( double  x,
double  min,
double  max 
)

Clamps a value between a minimum and maximum.

Parameters
xValue to clamp.
minMinimum value.
maxMaximum value.
Returns
Clamped value.

Definition at line 269 of file std.hpp.

◆ cos()

double std::cos ( double  x)

Computes the cosine of a number.

Parameters
xValue.
Returns
Cosine of the value.

Definition at line 63 of file std.hpp.

◆ cosh()

double std::cosh ( double  x)

Computes the hyperbolic cosine of a number.

Parameters
xValue.
Returns
Hyperbolic cosine of the value.

Definition at line 154 of file std.hpp.

◆ exp()

double std::exp ( double  x)

Computes the exponential function of a number.

Parameters
xValue.
Returns
Exponential function of the value.

Definition at line 22 of file std.hpp.

◆ fabs()

double std::fabs ( double  x)

Computes the absolute value of a floating-point number.

Parameters
xValue.
Returns
Absolute value of the floating-point number.

Definition at line 93 of file std.hpp.

◆ floor()

double std::floor ( double  x)

Computes the floor of a number.

Parameters
xValue.
Returns
Floor of the value.

Definition at line 194 of file std.hpp.

◆ fmod()

double std::fmod ( double  x,
double  y 
)

Computes the remainder of the division of two numbers.

Parameters
xNumerator.
yDenominator.
Returns
Remainder of the division.

Definition at line 205 of file std.hpp.

◆ log()

double std::log ( double  x)

Computes the natural logarithm of a number.

Parameters
xValue.
Returns
Natural logarithm of the value.

Definition at line 103 of file std.hpp.

◆ log10()

double std::log10 ( double  x)

Computes the base-10 logarithm of a number.

Parameters
xValue.
Returns
Base-10 logarithm of the value.

Definition at line 12 of file std.hpp.

◆ max()

double std::max ( double  a,
double  b 
)

Computes the maximum of two numbers.

Parameters
aFirst number.
bSecond number.
Returns
Maximum of the two numbers.

Definition at line 280 of file std.hpp.

◆ min()

double std::min ( double  a,
double  b 
)

Computes the minimum of two numbers.

Parameters
aFirst number.
bSecond number.
Returns
Minimum of the two numbers.

Definition at line 291 of file std.hpp.

◆ pow()

double std::pow ( double  base,
double  exponent 
)

Computes the power of a number.

Parameters
baseBase value.
exponentExponent value.
Returns
Result of raising base to the power of exponent.

Definition at line 43 of file std.hpp.

◆ shuffle()

template<class RandomIt >
void std::shuffle ( RandomIt  first,
RandomIt  last 
)

Shuffles the elements in a range.

Template Parameters
RandomItIterator type.
Parameters
firstIterator to the first element.
lastIterator to the last element.

Definition at line 227 of file std.hpp.

◆ sin()

double std::sin ( double  x)

Computes the sine of a number.

Parameters
xValue.
Returns
Sine of the value.

Definition at line 53 of file std.hpp.

◆ sinh()

double std::sinh ( double  x)

Computes the hyperbolic sine of a number.

Parameters
xValue.
Returns
Hyperbolic sine of the value.

Definition at line 164 of file std.hpp.

◆ sqrt()

double std::sqrt ( double  x)

Computes the square root of a number.

Parameters
xValue.
Returns
Square root of the value.

Definition at line 32 of file std.hpp.

◆ swap< nlohmann::json >()

template<>
void std::swap< nlohmann::json > ( nlohmann::json j1,
nlohmann::json j2 
)
inlinenoexcept

exchanges the values of two JSON objects

Since
version 1.0.0

Definition at line 20770 of file json.hpp.

◆ tan()

double std::tan ( double  x)

Computes the tangent of a number.

Parameters
xValue.
Returns
Tangent of the value.

Definition at line 73 of file std.hpp.

◆ tanh()

double std::tanh ( double  x)

Computes the hyperbolic tangent of a number.

Parameters
xValue.
Returns
Hyperbolic tangent of the value.

Definition at line 174 of file std.hpp.

Variable Documentation

◆ cerr

iostream std::cerr

Standard error stream.

This is the standard error stream, typically used for printing error messages to the console.

Definition at line 315 of file std.hpp.

◆ cout

iostream std::cout

Standard output stream.

This is the standard output stream, typically used for printing text to the console.

Definition at line 301 of file std.hpp.

◆ endl

iostream std::endl

End-of-line manipulator.

This manipulator is used to insert a newline character into the output stream and flush the stream.

Definition at line 308 of file std.hpp.