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

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

Solve Ax=b using the specified iterative method for complex float values.

## Declaration

```swift
func SparseSolve(_ method: SparseIterativeMethod, _ ApplyOperator: @escaping (Bool, CBLAS_TRANSPOSE, DenseVector_Complex_Float, DenseVector_Complex_Float) -> Void, _ b: DenseVector_Complex_Float, _ x: DenseVector_Complex_Float) -> SparseIterativeStatus_t
```

## Parameters

- `method`: (Input) Iterative method specification, eg return value of SparseConjugateGradient().
- `ApplyOperator`: ApplyOperator(accumulate, trans, x, y) should perform the operation y = op(A)x if accumulate is false, or y += op(A)x if accumulate is true.
- `b`: The right-hand side b to solve for. If a has dimension m x n, then b must have length m.
- `x`: On entry, initial guess for solution, on return the solution. If A has dimension m x n, then x must have length n. 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(_:_:_:_:)-35kl2.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-1ogxn.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-2bm9r.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-2ygeh.md)
- [SparseSolve(_:_:_:_:_:)](accelerate/sparsesolve(_:_:_:_:_:)-7yfqx.md)
