Returns a Cholesky factor as a `LinearOperator`. Given `A` representing this `LinearOperator`, if `A` is positive definite self-adjoint, return `L`, where `A = L L^T`, i.e. the cholesky decomposition. Args: name: A name for this `Op`. Returns: `LinearOperator` whi
(self, name="cholesky")
| 913 | return linear_operator_algebra.inverse(self) |
| 914 | |
| 915 | def cholesky(self, name="cholesky"): |
| 916 | """Returns a Cholesky factor as a `LinearOperator`. |
| 917 | |
| 918 | Given `A` representing this `LinearOperator`, if `A` is positive definite |
| 919 | self-adjoint, return `L`, where `A = L L^T`, i.e. the cholesky |
| 920 | decomposition. |
| 921 | |
| 922 | Args: |
| 923 | name: A name for this `Op`. |
| 924 | |
| 925 | Returns: |
| 926 | `LinearOperator` which represents the lower triangular matrix |
| 927 | in the Cholesky decomposition. |
| 928 | |
| 929 | Raises: |
| 930 | ValueError: When the `LinearOperator` is not hinted to be positive |
| 931 | definite and self adjoint. |
| 932 | """ |
| 933 | |
| 934 | if not self._can_use_cholesky(): |
| 935 | raise ValueError("Cannot take the Cholesky decomposition: " |
| 936 | "Not a positive definite self adjoint matrix.") |
| 937 | with self._name_scope(name): |
| 938 | return linear_operator_algebra.cholesky(self) |
| 939 | |
| 940 | def _to_dense(self): |
| 941 | """Generic and often inefficient implementation. Override often.""" |