Tessero\Sparse\Linalg\LinearOperator
AI assistant
Build this with Claude Code, Cursor or Copilot
Copy a Tessero-tuned prompt for Tessero\Sparse\Linalg\LinearOperator, grounded in 16 real API signatures , into your IDE's AI. No chatbot, just exact context.
fromMatrix
static
fromMatrix(array $matrix, string $dtype = 'float64'): self
Wrap an explicit dense matrix A (list of rows). matvec = A x, rmatvec = A^T x.
fromCallbacks
static
fromCallbacks(array $shape, callable $matvec, ?callable $rmatvec = null, ?callable $matmat = null, string $dtype = 'float64'): self
Construct from callbacks (as scipy LinearOperator(shape, matvec, rmatvec, matmat)).
shape
shape(): array
dtype
dtype(): string
ndim
ndim(): int
matvec
matvec(array $x): array
Matrix-vector product A x. Accepts a flat list; returns a flat list.
rmatvec
rmatvec(array $y): array
Adjoint (here, transpose) matrix-vector product A^H y.
matmat
matmat(array $X): array
Matrix-matrix product A X, X row-major of shape (n, k); returns shape (m, k).
dot
dot(array $x): array
dot(x): matvec if x is 1-D, matmat if x is 2-D (row-major).
adjoint
adjoint(): self
Adjoint operator A^H (conjugate transpose; for real data this is the transpose).
transpose
transpose(): self
Transpose operator A^T (== adjoint for real data).
getH
getH(): self
scipy property aliases.
getT
getT(): self
scale
scale(float $alpha): self
Scalar multiple (alpha * A).
add
add(Tessero\Sparse\Linalg\LinearOperator $other): self
Operator sum (A + B); shapes must match.
compose
compose(Tessero\Sparse\Linalg\LinearOperator $other): self
Operator composition / product (A @ B): applies B then A.