Absolute and Negation Functions

No overview available.

Topics

Single-Vector Absolute Value

The functions in this group compute the absolute value of each element in a vector.

static func absolute<U>(U) -> [Double]

Returns the absolute value of each element in the supplied double-precision vector.

static func absolute<U>(U) -> [Float]

Returns the absolute value of each element in the supplied single-precision vector.

static func absolute<V>(DSPSplitComplex, result: inout V)

Calculates the absolute value of each element in the supplied single-precision complex vector.

static func absolute<V>(DSPDoubleSplitComplex, result: inout V)

Calculates the absolute value of each element in the supplied double-precision complex vector.

static func absolute<U, V>(U, result: inout V)

Calculates the absolute value of each element in the supplied double-precision vector.

static func absolute<U, V>(U, result: inout V)

Calculates the absolute value of each element in the supplied single-precision vector.

func vDSP_vabs(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Calculates the absolute value of each element in the supplied single-precision vector using specified stride.

func vDSP_vabsD(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Calculates the absolute value of each element in the supplied double-precision vector using specified stride.

func vDSP_vabsi(UnsafePointer<Int32>, vDSP_Stride, UnsafeMutablePointer<Int32>, vDSP_Stride, vDSP_Length)

Calculates the absolute value of each element in the supplied integer vector using specified stride.

func vDSP_vnabs(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Calculates the negative absolute value of each element in the supplied single-precision vector using specified stride.

func vDSP_vnabsD(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Calculates the negative absolute value of each element in the supplied double-precision vector using specified stride.

Single-Vector Negation

The functions in this group negate each element in a vector.

static func negative<U, V>(U, result: inout V)

Calculates the negative values of the supplied single-precision vector.

static func negative<U, V>(U, result: inout V)

Calculates the negative values of the supplied double-precision vector.

static func negative<U>(U) -> [Double]

Returns a double-precision array containing the negative values of the supplied vector.

static func negative<U>(U) -> [Float]

Returns a single-precision array containing the negative values of the supplied vector.

static func negativeAbsolute<U, V>(U, result: inout V)

Calculates the negative absolute values of the supplied double-precision vector.

static func negativeAbsolute<U>(U) -> [Double]

Returns a double-precision array containing the negative absolute values of the supplied vector.

static func negativeAbsolute<U, V>(U, result: inout V)

Calculates the negative absolute values of the supplied single-precision vector.

static func negativeAbsolute<U>(U) -> [Float]

Returns a single-precision array containing the negative absolute values of the supplied vector.

func vDSP_vneg(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Stride, vDSP_Length)

Calculates the negative value of each element in the supplied single-precision vector using specified stride.

func vDSP_vnegD(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Calculates the negative value of each element in the supplied double-precision vector using specified stride.