Return a fuction for solving a sparse linear system, with A pre-factorized.
Parameters : | A : (N, N) array_like
|
---|---|
Returns : | solve : callable
|
Examples
>>> A = np.array([[ 3. , 2. , -1. ],
[ 2. , -2. , 4. ],
[-1. , 0.5, -1. ]])
>>> solve = factorized( A ) # Makes LU decomposition.
>>> rhs1 = np.array([1,-2,0])
>>> x1 = solve( rhs1 ) # Uses the LU factors.
array([ 1., -2., -2.])