---
title: "SparseSolve(_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/sparsesolve(_:_:_:_:)-7zp1d"
---

# SparseSolve(_:_:_:_:)

Solve AX=B using the specified iterative method for complex double values.

## Declaration

```swift
func SparseSolve(_ method: SparseIterativeMethod, _ A: SparseMatrix_Complex_Double, _ B: DenseMatrix_Complex_Double, _ X: DenseMatrix_Complex_Double) -> SparseIterativeStatus_t
```

## Parameters

- `method`: (Input) Iterative method specification, eg return value of SparseConjugateGradient().
- `A`: (Input) The matrix A to solve the system for. Only used for multiplication by A or A^T.
- `B`: The right-hand sides B to solve for. If A has dimension m x n, then B must have dimension m x nrhs, where nrhs is the number of right-hand sides to find solutions for.
- `X`: On entry, initial guess for solution, on return the solution. If A has dimension m x n, and B has dimension m x nrhs, then X must have dimension n x nrhs. If no good initial estimate is available, user should set the initial guess to be the zero vector.

## See Also

### Iterative sparse solve functions for complex matrices

- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-41c6p.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-4xwsw.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-155od.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-1fw3p.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-1i6u8.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-4fvqm.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-4fvqm.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-4fvqm.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-655i9.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-7hdp4.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-7m9vp.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-6wjj9.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-8bndu.md)
- [SparseSolve(_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:)-8yld7.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-4xd4z.md)
