---
title: DenseVector_Double
framework: accelerate
role: symbol
role_heading: Structure
path: accelerate/densevector_double
---

# DenseVector_Double

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

## Declaration

```swift
struct DenseVector_Double
```

## Mentioned in

Solving systems using direct methods Solving systems using iterative methods

## Overview

Overview You typically use dense vectors to represent the unknowns vector, x, and the right-hand-side vector, b, in the matrix equation Ax = b. A DenseVector_Double structure provides a pointer to its underlying data and a count of its number of elements. The following code shows an example of how to create a dense vector structure from an array of double-precision values. In this case, use withUnsafeMutableBufferPointer(_:) to pass a pointer to your collection. The DenseVector_Double structure is valid only during the execution of the closure. Don’t store or return the structure for later use. var vectorValues: [Double] = [10, 20, 30, 40] let vectorValuesCount = Int32(vectorValues.count)

vectorValues.withUnsafeMutableBufferPointer { vectorValuesPtr in          let vector = DenseVector_Double(count: vectorValuesCount,                                     data: vectorValuesPtr.baseAddress!)          // Perform operations using `vector`. }

## Topics

### Initializers

- [init(count:data:)](accelerate/densevector_double/init(count:data:).md)

### Inspecting a Vector’s Structure and Data

- [count](accelerate/densevector_double/count.md)
- [data](accelerate/densevector_double/data.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)

## See Also

### Creating dense matrices and dense vectors

- [DenseMatrix_Double](accelerate/densematrix_double.md)
- [DenseMatrix_Float](accelerate/densematrix_float.md)
- [DenseVector_Float](accelerate/densevector_float.md)
