egttools.numerical.linear_operator.make_residual_operator¶
- make_residual_operator(operator)[source]¶
Wrap a PairwiseComparisonTransitionOperator as a scipy LinearOperator for (I - P^T).
The returned LinearOperator A satisfies: -
A @ xcomputesy = (I - P^T) x(matvec)Useful for iterative linear solvers (GMRES, LGMRES) that seek π with
(I - P^T) π = 0. Because the system is singular, a normalization constraint must be added externally (e.g. replace one equation withΣ π_i = 1).- Parameters:
operator (PairwiseComparisonTransitionOperator) – Fully constructed C++ transition operator.
- Returns:
Shape
(n, n)operator wheren = operator.size.- Return type: