Structure

DenseVector_Double

A structure that contains a dense vector of double-precision, floating-point values.

Declaration

struct DenseVector_Double

Overview

The following example shows the code required to create and iterate over a dense vector containing four Double values.

var values = [2.20, 2.85, 2.79, 2.87]
let vector = DenseVector_Double(count: Int32(values.count),
                                data: &values)
 
stride(from: 0, to: vector.count, by: 1).forEach {i in
    print(vector.data[Int(i)])
}

Topics

Initializers

init(count: Int32, data: UnsafeMutablePointer<Double>)

Creates a new vector of double-precision values.

Inspecting a Vector's Structure and Data

var count: Int32

The number of items in the vector.

var data: UnsafeMutablePointer<Double>

The array of double-precision, floating-point values.

See Also

Dense Matrices and Vectors

struct DenseMatrix_Double

A structure that contains a dense matrix of double-precision, floating-point values.

struct DenseMatrix_Float

A structure that contains a dense matrix of single-precision, floating-point values.

struct DenseVector_Float

A structure that contains a dense vector of single-precision, floating-point values.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software