pub struct BRSTComplex {
pub cochains: Vec<Vec<f64>>,
pub differentials: Vec<Vec<Vec<f64>>>,
}Expand description
A simple cochain complex representing a truncated BRST complex.
Stores cohomology-degree cochains as vectors of real numbers. The BRST differential Q increases ghost number by 1.
Fields§
§cochains: Vec<Vec<f64>>Cochains at each ghost number 0, 1, 2, …
differentials: Vec<Vec<Vec<f64>>>The differential matrix Q[k] : C^k → C^{k+1}.
Implementations§
Source§impl BRSTComplex
impl BRSTComplex
Sourcepub fn new(dims: Vec<usize>) -> Self
pub fn new(dims: Vec<usize>) -> Self
Create a zero BRST complex with given dimensions at each degree.
Sourcepub fn apply_differential(&self, k: usize, v: &[f64]) -> Vec<f64>
pub fn apply_differential(&self, k: usize, v: &[f64]) -> Vec<f64>
Apply the differential Q at degree k: (Qv)[i] = Σ_j Q[k][i][j] * v[j].
Sourcepub fn check_nilpotency(&self, k: usize, eps: f64) -> bool
pub fn check_nilpotency(&self, k: usize, eps: f64) -> bool
Check nilpotency Q² = 0 at degree k (||Q_{k+1} Q_k||_F < ε).
Sourcepub fn euler_characteristic(&self) -> i64
pub fn euler_characteristic(&self) -> i64
Compute the Euler characteristic χ = Σ (-1)^k dim C^k.
Sourcepub fn dimensions(&self) -> Vec<usize>
pub fn dimensions(&self) -> Vec<usize>
Return the dimensions of the cochain spaces.
Trait Implementations§
Source§impl Clone for BRSTComplex
impl Clone for BRSTComplex
Source§fn clone(&self) -> BRSTComplex
fn clone(&self) -> BRSTComplex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BRSTComplex
impl RefUnwindSafe for BRSTComplex
impl Send for BRSTComplex
impl Sync for BRSTComplex
impl Unpin for BRSTComplex
impl UnsafeUnpin for BRSTComplex
impl UnwindSafe for BRSTComplex
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
Mutably borrows from an owned value. Read more