Methods based on solve to solve a linear system of equations involving WoodburyMatrix objects. These methods take advantage of the Woodbury matrix identity and therefore can be much more time and memory efficient than forming the matrix directly.

Calling this function while omitting the b argument returns the inverse of a. This is NOT recommended, since it removes any benefit from using an implicit representation of a.

# S4 method for GWoodburyMatrix,missing
solve(a)

# S4 method for GWoodburyMatrix,ANY
solve(a, b)

# S4 method for SWoodburyMatrix,missing
solve(a)

# S4 method for SWoodburyMatrix,ANY
solve(a, b)

Arguments

a

WoodburyMatrix object.

b

Matrix, vector, or similar (needs to be compatible with the submatrices a@A and a@V or a@X that define the WoodburyMatrix).

Value

The solution to the linear system, or the inverse of the matrix. The class of the return value will be a subclass of Matrix, with the specific subclass determined by a and b.

Functions

  • solve,GWoodburyMatrix,missing-method: Invert the matrix

  • solve,GWoodburyMatrix,ANY-method: Solve the linear system

  • solve,SWoodburyMatrix,missing-method: Invert the symmetric matrix

  • solve,SWoodburyMatrix,ANY-method: Solve the linear system