maximum(_:)
Returns the double-precision maximum value of a vector.
Declaration
static func maximum<U>(_ vector: U) -> Double where U : AccelerateBuffer, U.Element == DoubleParameters
- vector:
The input vector.
Return Value
The maximum value of the vector.
Discussion
This function calculates the maximum 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 maximum = vDSP.maximum(a)
print("maximum", maximum) // Prints "maximum 3.6"