Skip to content

Commit

Permalink
Rewrite transpose note into KaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt committed Oct 1, 2022
1 parent a621b1b commit 1b1bc82
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lax/src/solve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ impl_lu!(c32, lapack_sys::cgetrf_);
impl_lu!(f64, lapack_sys::dgetrf_);
impl_lu!(f32, lapack_sys::sgetrf_);

#[cfg_attr(doc, katexit::katexit)]
/// Helper trait to abstract `*getrs` LAPACK routines for implementing [Lapack::solve]
///
/// If the array has C layout, then it needs to be handled
Expand All @@ -63,13 +64,15 @@ impl_lu!(f32, lapack_sys::sgetrf_);
/// or "no transpose", respectively. For the "Hermite" case, we
/// can take advantage of the following:
///
/// ```text
/// A^H x = b
/// ⟺ conj(A^T) x = b
/// ⟺ conj(conj(A^T) x) = conj(b)
/// ⟺ conj(conj(A^T)) conj(x) = conj(b)
/// ⟺ A^T conj(x) = conj(b)
/// ```
/// $$
/// \begin{align*}
/// A^H x &= b \\\\
/// \Leftrightarrow \overline{A^T} x &= b \\\\
/// \Leftrightarrow \overline{\overline{A^T} x} &= \overline{b} \\\\
/// \Leftrightarrow \overline{\overline{A^T}} \overline{x} &= \overline{b} \\\\
/// \Leftrightarrow A^T \overline{x} &= \overline{b}
/// \end{align*}
/// $$
///
/// So, we can handle this case by switching to "no transpose"
/// (which is equivalent to transposing the array since it will
Expand Down

0 comments on commit 1b1bc82

Please sign in to comment.