pub struct Operator;Implementations§
Source§impl Operator
impl Operator
pub fn compute_gradients<const N: usize>( grid: &Grid<N>, v: &[f64], ) -> Vec<Gradients<N>>
pub fn initialize_matrix<const N: usize>(grid: &Grid<N>) -> CsrMatrix
Sourcepub fn update_matrix<const N: usize, M: Model<N> + Sync>(
mat: &mut CsrMatrix,
dt: f64,
grid: &Grid<N>,
controls: &[ControlOutput<N>],
model: &M,
)
pub fn update_matrix<const N: usize, M: Model<N> + Sync>( mat: &mut CsrMatrix, dt: f64, grid: &Grid<N>, controls: &[ControlOutput<N>], model: &M, )
Updates the values of the existing CSR Matrix.
Uses unsafe pointer arithmetic to allow parallel updates to the values vector. SAFETY: row_ptr guarantees disjoint memory regions for each row.
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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