pub struct RotationResidual {
rows: Vec<i32>,
columns: Vec<i32>,
entries: Vec<(usize, usize)>,
spherical: Option<Spherical>,
value: DMatrix<Complex>,
}Expand description
What sw_rotation and cw_rotation save for their pullback: the rotation
matrix, its coupled entries and, for spherical bases, the angular blocks.
The pullback adds the entries in order on the calling thread, so its result does not depend on the thread count.
Fields§
§rows: Vec<i32>§columns: Vec<i32>§entries: Vec<(usize, usize)>The coupled entries; all others vanish.
spherical: Option<Spherical>§value: DMatrix<Complex>Implementations§
Source§impl RotationResidual
impl RotationResidual
Sourcepub fn sw_state_size(
destination: &[(usize, Mode)],
source: &[(usize, Mode)],
) -> Result<usize>
pub fn sw_state_size( destination: &[(usize, Mode)], source: &[(usize, Mode)], ) -> Result<usize>
Saved-state size from spherical mode labels, without evaluating a rotation.
Sourcepub fn cw_state_size(
destination: &[(usize, Mode)],
source: &[(usize, Mode)],
) -> Result<usize>
pub fn cw_state_size( destination: &[(usize, Mode)], source: &[(usize, Mode)], ) -> Result<usize>
Saved-state size from cylindrical mode labels, without evaluating a rotation.
Sourcepub const fn value(&self) -> &DMatrix<Complex>
pub const fn value(&self) -> &DMatrix<Complex>
The rotation from the source to the destination multipole coefficients, which the pullback reads.
Sourcepub fn shape(&self) -> (usize, usize)
pub fn shape(&self) -> (usize, usize)
The shape of the rotation: destination and source mode counts.
Sourcepub fn pushforward(&self, angles: [f64; 3]) -> Result<DMatrix<Complex>>
pub fn pushforward(&self, angles: [f64; 3]) -> Result<DMatrix<Complex>>
Contract the Euler-angle derivatives with one real direction. Cylindrical theta remains a fixed zero constraint and contributes no derivative.
Sourcefn theta_derivative(&self, i: usize, j: usize) -> Complex
fn theta_derivative(&self, i: usize, j: usize) -> Complex
The shared ladder rule used by the JVP and VJP.
Trait Implementations§
Source§impl Debug for RotationResidual
impl Debug for RotationResidual
Source§impl SavedState for RotationResidual
impl SavedState for RotationResidual
Auto Trait Implementations§
impl Freeze for RotationResidual
impl RefUnwindSafe for RotationResidual
impl Send for RotationResidual
impl Sync for RotationResidual
impl Unpin for RotationResidual
impl UnwindSafe for RotationResidual
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.