<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/SparseMatrixStructure/init(rowCount:columnCount:columnStarts:rowIndices:attributes:blockSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So21SparseMatrixStructurea8rowCount06columnE00F6Starts0D7Indices10attributes9blockSizeABs5Int32V_AJSpySiGSpyAJGSo0A12Attributes_tas5UInt8Vtcfc"
  },
  "title" : "init(rowCount:columnCount:columnStarts:rowIndices:attributes:blockSize:)"
}
-->

# init(rowCount:columnCount:columnStarts:rowIndices:attributes:blockSize:)

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

```
init(rowCount: Int32, columnCount: Int32, columnStarts: UnsafeMutablePointer<Int>, rowIndices: UnsafeMutablePointer<Int32>, attributes: SparseAttributes_t, blockSize: UInt8)
```

## Parameters

`rowCount`

The number of rows in the matrix.

`columnCount`

The number of columns in the matrix.

`columnStarts`

An array that specifies where each column starts in the row indices array. This array requires an additional, final entry that defines the final column’s length.

`rowIndices`

The row indices of the matrix.

`attributes`

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

`blockSize`

The block size of the matrix.

## Discussion

---

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)