Default implementation of _solve.
(self, rhs, adjoint=False, adjoint_arg=False)
| 724 | return self._log_abs_determinant() |
| 725 | |
| 726 | def _solve(self, rhs, adjoint=False, adjoint_arg=False): |
| 727 | """Default implementation of _solve.""" |
| 728 | if self.is_square is False: |
| 729 | raise NotImplementedError( |
| 730 | "Solve is not yet implemented for non-square operators.") |
| 731 | logging.warn( |
| 732 | "Using (possibly slow) default implementation of solve." |
| 733 | " Requires conversion to a dense matrix and O(N^3) operations.") |
| 734 | rhs = linalg.adjoint(rhs) if adjoint_arg else rhs |
| 735 | if self._can_use_cholesky(): |
| 736 | return linear_operator_util.cholesky_solve_with_broadcast( |
| 737 | linalg_ops.cholesky(self.to_dense()), rhs) |
| 738 | return linear_operator_util.matrix_solve_with_broadcast( |
| 739 | self.to_dense(), rhs, adjoint=adjoint) |
| 740 | |
| 741 | def solve(self, rhs, adjoint=False, adjoint_arg=False, name="solve"): |
| 742 | """Solve (exact or approx) `R` (batch) systems of equations: `A X = rhs`. |
no test coverage detected