Contents

minimum(_:)

Returns the double-precision minimum value of a vector.

Declaration

static func minimum<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == Double

Parameters

  • vector:

    The input vector.

Return Value

The minimum value of the vector.

Discussion

This function calculates the minimum value of the first N elements of input vector A, and writes the result to output scalar C.

[Image]

The following code shows an example of using this function:

let a: [Double] = [-1.5, 2.25, 3.6,
                   0.2, -0.1, -4.3]

let minimum = vDSP.minimum(a)
print("minimum", minimum) // Prints "minimum -4.3".

See Also

Type Methods