---
title: "init(structure:data:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/sparsematrix_double/init(structure:data:)"
---

# init(structure:data:)

Creates a sparse matrix with the specified structure that contains double-precision values.

## Declaration

```swift
init(structure: SparseMatrixStructure, data: UnsafeMutablePointer<Double>)
```

## Parameters

- `structure`: The sparsity structure of the matrix.
- `data`: The array of contiguous values in the nonzero blocks of the matrix. The matrix stores each block in column-major order. The number of elements in doc://com.apple.accelerate/documentation/Accelerate/SparseMatrix_Double/data must be equal to doc://com.apple.accelerate/documentation/Accelerate/SparseMatrixStructure/blockSize x doc://com.apple.accelerate/documentation/Accelerate/SparseMatrixStructure/blockSize x the number of nonzero blocks in the matrix.
