<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/SparseMatrixStructure",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@SA@SparseMatrixStructure"
  },
  "title" : "SparseMatrixStructure"
}
-->

# SparseMatrixStructure

A description of the sparsity structure of a sparse matrix.

```
struct SparseMatrixStructure
```

## Overview

The sparsity structure is in a *block compressed sparse column* format. The matrix consists of [`rowCount`](/documentation/Accelerate/SparseMatrixStructure/rowCount) x [`columnCount`](/documentation/Accelerate/SparseMatrixStructure/columnCount) blocks, each of which is a square matrix of some fixed size. The system stores this block size separately from the sparsity because the graph algorithms that operate on the structure don’t need it.

## Topics

### Creating a sparse matrix description

[`init(rowCount:columnCount:columnStarts:rowIndices:attributes:blockSize:)`](/documentation/Accelerate/SparseMatrixStructure/init(rowCount:columnCount:columnStarts:rowIndices:attributes:blockSize:))

Creates a new structure that represents the sparsity structure of a sparse matrix.

### Inspecting the properties of a sparse matrix description

[`attributes`](/documentation/Accelerate/SparseMatrixStructure/attributes)

The attributes of the matrix, such as whether it’s symmetrical or triangular.

[`blockSize`](/documentation/Accelerate/SparseMatrixStructure/blockSize)

The block size of the matrix.

[`columnCount`](/documentation/Accelerate/SparseMatrixStructure/columnCount)

The number of columns in the matrix.

[`columnStarts`](/documentation/Accelerate/SparseMatrixStructure/columnStarts)

The starting index for each column in the row indices array.

[`rowCount`](/documentation/Accelerate/SparseMatrixStructure/rowCount)

The number of rows in the matrix.

[`rowIndices`](/documentation/Accelerate/SparseMatrixStructure/rowIndices)

The row indices of the matrix.

## See Also

  <doc://com.apple.accelerate/documentation/Accelerate/creating-sparse-matrices>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)