abs

Functions
abs
Complete List of ArrayFire Functions ArrayFire Functions by Category » Mathematical functions » | Numeric functions

Absolute value. More...

## Functions
AFAPI array | abs (const array &in)
| C++ Interface for absolute value. More...
AFAPI af_err | af_abs (af_array *out, const af_array in)
| C Interface for absolute value. More...

## Detailed Description

Absolute value.

## Function Documentation

## ◆ abs()

AFAPI array af::abs | ( | const array & | in | ) |

C++ Interface for absolute value.

Parameters

  [in] | in | is input array

Returns
  absolute value of `in`

Examples:
  financial/black_scholes_options.cpp, getting_started/convolve.cpp, getting_started/vectorize.cpp, graphics/fractal.cpp, graphics/surface.cpp, image_processing/adaptive_thresholding.cpp, image_processing/brain_segmentation.cpp, image_processing/image_demo.cpp, machine_learning/bagging.cpp, machine_learning/kmeans.cpp, machine_learning/knn.cpp, machine_learning/logistic_regression.cpp, machine_learning/perceptron.cpp, machine_learning/rbm.cpp, and machine_learning/softmax_regression.cpp.

## ◆ af_abs()

AFAPI af_err af_abs | ( | af_array * | out,
|  | const af_array | in
| ) |  |

C Interface for absolute value.

Parameters

  [out] | out | will contain the absolute value of `in`
  [in] | in | is input array

Returns
  AF_SUCCESS if the execution completes properly