# Algebraic Functions [Modules]

Basic algebraic functions. More...

## Functions

ml_matrixml_matrix::abs ()
Absolute value function - changes all values in the matrix to the absolute value of the element.

ml_matrixml_matrix::ceil ()
Changes each element to the smallest integer greater than or equal to that element.

ml_matrixml_matrix::floor ()
Changes each element to the largest integer less than or equal to that element.

ml_matrixml_matrix::round ()
Rounds each element to the nearest integral value, rounding half-way cases away from zero.

ml_matrixml_matrix::rint ()
Rounds each element to the nearest integral value according to the prevailing rounding mode.

ml_matrixml_matrix::dotpow (double n)
Raises each element of the matrix to the given power.

ml_matrixml_matrix::sqrt ()
Sets each element equal to its square root.

ml_matrixml_matrix::exp ()
Computes the base-e exponential of each element in the matrix.

ml_matrixml_matrix::expm1 ()
Computes the base-e exponential of each element in the matrix, minus 1.

ml_matrixml_matrix::log ()
Computes the natural logarithm of each element in the matrix.

ml_matrixml_matrix::log10 ()
Computes the logarithm of each element in the matrix to base 10.

ml_matrixml_matrix::log1p ()
Computes the natural logarithm of each element in the matrix plus 1.

ml_matrixml_matrix::log2 ()
Computes the logarithm of each element in the matrix to base 2.

ml_matrixml_matrix::logb ()
Computes the exponent of each element in the matrix.

ml_matrix abs (const ml_matrix &x)
Absolute value function - changes all values in the matrix to the absolute value of the element.

ml_matrix ceil (const ml_matrix &x)
Changes each element to the smallest integer greater than or equal to that element.

ml_matrix floor (const ml_matrix &x)
Changes each element to the largest integer less than or equal to that element.

ml_matrix round (const ml_matrix &x)
Rounds each element to the nearest integral value, rounding half-way cases away from zero.

ml_matrix rint (const ml_matrix &x)
Rounds each element to the nearest integral value according to the prevailing rounding mode.

ml_matrix dotpow (const ml_matrix &, double n)
Raises each element of the matrix to the given power.

ml_matrix sqrt (const ml_matrix &x)
Returns the square root of each element.

ml_matrix exp (const ml_matrix &x)
Calls the std::exp() function on each element in the matrix.

ml_matrix expm1 (const ml_matrix &x)
Calls the std::expm1() function on each element in the matrix.

ml_matrix log (const ml_matrix &x)
Calls the std::log() function on each element in the matrix.

ml_matrix log10 (const ml_matrix &x)
Calls the std::log10() function on each element in the matrix.

ml_matrix log1p (const ml_matrix &x)
Calls the std::log1p() function on each element in the matrix.

ml_matrix log2 (const ml_matrix &x)
Calls the std::log2() function on each element in the matrix.

ml_matrix logb (const ml_matrix &x)
Calls the std::logb() function on each element in the matrix.

## Detailed Description

These functions apply standard algebraic operations to each element in a matrix.

## Function Documentation

 ml_matrix & ml_matrix::abs ( ) ` [inherited]`
 Absolute value function - changes all values in the matrix to the absolute value of the element. Returns:Returns a matrix with the absolute value of all the elements of the the original matrix.

 ml_matrix & ml_matrix::ceil ( ) ` [inherited]`
 Changes each element to the smallest integer greater than or equal to that element. Returns:Returns the matrix whose elements correspond to the ceil values for the elements of the original matrix.

 ml_matrix & ml_matrix::floor ( ) ` [inherited]`
 Changes each element to the largest integer less than or equal to that element. Returns:Returns the matrix whose elements correspond to the floor values for the elements of the original matrix.

 ml_matrix & ml_matrix::round ( ) ` [inherited]`
 Rounds each element to the nearest integral value, rounding half-way cases away from zero. Returns:Returns the matrix with all elements rounded.

 ml_matrix & ml_matrix::rint ( ) ` [inherited]`
 Rounds each element to the nearest integral value according to the prevailing rounding mode. The rounding mode can be specified using fesetround() from the C99 specification for IEEE floating point environments. This may not be available on all systems. The options for rounding direction include: FE_TONEAREST - round to the nearest integral value FE_TOWARDZERO - round elements towards zero FE_UPWARD - round elements upwards FE_DOWNWARD - round elements downwards Returns:Returns the matrix with all elements rounded according to the prevailing rounding mode.

 ml_matrix & ml_matrix::dotpow ( double n ) ` [inherited]`

Raises each element to the given power.

Parameters:
 n The power to raise each element to.
Returns:
Returns the matrix with the new values.

 ml_matrix & ml_matrix::sqrt ( ) ` [inherited]`
 Finds the square root of each element. Returns:Returns the matrix with the new values.

 ml_matrix & ml_matrix::exp ( ) ` [inherited]`
 Calls the std::exp() function on each element in the matrix. Returns:Returns the matrix with the new values.

 ml_matrix & ml_matrix::expm1 ( ) ` [inherited]`
 Calls the std::expm1() function on each element in the matrix. Returns:Returns the matrix with the new values.

 ml_matrix & ml_matrix::log ( ) ` [inherited]`
 Calls the std::log() function on each element in the matrix. Returns:Returns the matrix with the new values.

 ml_matrix & ml_matrix::log10 ( ) ` [inherited]`
 Calls the std::log10() function on each element in the matrix. Returns:Returns the matrix with the new values.

 ml_matrix & ml_matrix::log1p ( ) ` [inherited]`
 Calls the std::log1p() function on each element in the matrix. Returns:Returns the matrix with the new values.

 ml_matrix & ml_matrix::log2 ( ) ` [inherited]`
 Calls the std::log2() function on each element in the matrix. Returns:Returns the matrix with the new values.

 ml_matrix & ml_matrix::logb ( ) ` [inherited]`
 Calls the std::logb() function on each element in the matrix. Returns:Returns the matrix with the new values.

 ml_matrix abs ( const ml_matrix & m )

Absolute value function - finds the absolute value of each element of a matrix.

Parameters:
 m Find the absolute value of this matrix.
Returns:
Returns a matrix with the absolute value of all the elements of the the original matrix.

 ml_matrix ceil ( const ml_matrix & m )

Finds the smallest integer greater than or equal to each element in the original matrix.

Parameters:
 m Perform the ceiling operation on this matrix.
Returns:
Returns the matrix whose elements correspond to the ceil values for the elements of the original matrix.

 ml_matrix floor ( const ml_matrix & m )

Finds the largest integer less than or equal to each element in the original matrix.

Parameters:
 m Perform the floor operation on this matrix.
Returns:
Returns the matrix whose elements correspond to the floor values for the elements of the original matrix.

 ml_matrix round ( const ml_matrix & m )

Rounds each element to the nearest integral value, rounding half-way cases away from zero.

Parameters:
 m The matrix.
Returns:
Returns a new matrix equal to the original matrix following the round operation.

 ml_matrix rint ( const ml_matrix & m )

Rounds each element to the nearest integral value according to the prevailing rounding mode. /sa ml_matrix::rint().

Parameters:
 m The matrix.
Returns:
Returns a new matrix equal to the original matrix following the round operation.

 ml_matrix dotpow ( const ml_matrix & m, double n )

Raises each element to the given power.

Parameters:
 m The matrix to perform the pow function on. n The power to raise each element to.
Returns:
Returns the matrix with the new values.

 ml_matrix sqrt ( const ml_matrix & m )

Finds the square root of each element.

Parameters:
 m The matrix to find the square root of.
Returns:
Returns the matrix with the new values.

 ml_matrix exp ( const ml_matrix & m )

Calls the std::exp() function on each element in the matrix.

Parameters:
 m The matrix to call exp on.
Returns:
Returns the matrix with the new values.

 ml_matrix expm1 ( const ml_matrix & m )

Calls the std::expm1() function on each element in the matrix.

Parameters:
 m The matrix to call expm1 on.
Returns:
Returns the matrix with the new values.

 ml_matrix log ( const ml_matrix & m )

Calls the std::log() function on each element in the matrix.

Parameters:
 m The matrix to call log on.
Returns:
Returns the matrix with the new values.

 ml_matrix log10 ( const ml_matrix & m )

Calls the std::log10() function on each element in the matrix.

Parameters:
 m The matrix to call log10 on.
Returns:
Returns the matrix with the new values.

 ml_matrix log1p ( const ml_matrix & m )

Calls the std::log1p() function on each element in the matrix.

Parameters:
 m The matrix to call log1p on.
Returns:
Returns the matrix with the new values.

 ml_matrix log2 ( const ml_matrix & m )

Calls the std::log2() function on each element in the matrix.

Parameters:
 m The matrix to call log2 on.
Returns:
Returns the matrix with the new values.

 ml_matrix logb ( const ml_matrix & m )

Calls the std::logb() function on each element in the matrix.

Parameters:
 m The matrix to call logb on.
Returns:
Returns the matrix with the new values.