Structure

DenseVector_Double

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

Declaration

typedef 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

Inspecting a Vector's Structure and Data

count

The number of items in the vector.

data

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

See Also

Dense Matrices and Vectors

DenseMatrix_Double

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

DenseMatrix_Float

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

DenseVector_Float

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