Functions
The following functions are available globally.
-
Mean value. Float type version.
Declaration
Swift
public func vMean(_ v: [Float]) -> Float
-
Mean value. Double type version.
Declaration
Swift
public func vMean(_ v: [Double]) -> Double
-
Summation. Float type version.
Declaration
Swift
public func vSum(_ v: [Float]) -> Float
-
Summation. Double type version.
Declaration
Swift
public func vSum(_ v: [Double]) -> Double
-
Vector length. Float type version.
Declaration
Swift
public func vLength(_ v: [Float]) -> Float
-
Vector length. Double type version.
Declaration
Swift
public func vLength(_ v: [Double]) -> Double
-
Square of length. Float type version.
Declaration
Swift
public func vPower(_ v: [Float]) -> Float
-
Square of length. Double type version.
Declaration
Swift
public func vPower(_ v: [Double]) -> Double
-
Add scalar to vector. Float type version.
Declaration
Swift
public func vAdd(_ v: [Float], valueToAdd: Float) -> [Float]
-
Add scalar to vector. Double type version.
Declaration
Swift
public func vAdd(_ v: [Double], valueToAdd: Double) -> [Double]
-
Multiply vector with scalar. Float type version.
Declaration
Swift
public func vMultiply(_ v: [Float], valueToMultiply: Float) -> [Float]
-
Multiply vector with scalar. Double type version.
Declaration
Swift
public func vMultiply(_ v: [Double], valueToMultiply: Double) -> [Double]
-
Remove mean value. Float type version.
Declaration
Swift
public func vRemoveMean(_ v: [Float]) -> [Float]
-
Remove mean value. Double type version.
Declaration
Swift
public func vRemoveMean(_ v: [Double]) -> [Double]
-
Normalize vector to have unit length. Float type version.
Declaration
Swift
public func vNormalizeToUnitLength(_ v: [Float], centralized: Bool) -> [Float]
-
Normalize vector to have unit length. Double type version.
Declaration
Swift
public func vNormalizeToUnitLength(_ v: [Double], centralized: Bool) -> [Double]
-
Sqrt. Float type version.
Declaration
Swift
public func vSqrt(_ v: [Float]) -> [Float]
-
Sqrt. Double type version.
Declaration
Swift
public func vSqrt(_ v: [Double]) -> [Double]
-
Dot production between two vectors. Float type version.
Declaration
Swift
public func vDotProduct(_ v1: [Float], v2: [Float]) -> Float
-
Dot production between two vectors. Double type version.
Declaration
Swift
public func vDotProduct(_ v1: [Double], v2: [Double]) -> Double
-
Correlation Coefficient between two vectors. Float type version.
Declaration
Swift
public func vCorrelationCoefficient(_ v1: [Float], v2: [Float]) -> Float
-
Correlation Coefficient between two vectors. Double type version.
Declaration
Swift
public func vCorrelationCoefficient(_ v1: [Double], v2: [Double]) -> Double