pub struct ValueBatchMut<'a> {
pub n_rows: usize,
pub n_nodes: usize,
pub values: &'a mut [f64],
}Expand description
Mutable view into a value batch (owned buffer).
Fields§
§n_rows: usizeRows.
n_nodes: usizeNodes.
values: &'a mut [f64]Flat column-major storage.
Implementations§
Source§impl<'a> ValueBatchMut<'a>
impl<'a> ValueBatchMut<'a>
Sourcepub fn new(
n_rows: usize,
n_nodes: usize,
values: &'a mut [f64],
) -> Result<Self, ModelError>
pub fn new( n_rows: usize, n_nodes: usize, values: &'a mut [f64], ) -> Result<Self, ModelError>
Sourcepub fn column_mut(&mut self, node: usize) -> Result<&mut [f64], ModelError>
pub fn column_mut(&mut self, node: usize) -> Result<&mut [f64], ModelError>
Sourcepub fn into_batch(self) -> ValueBatch
pub fn into_batch(self) -> ValueBatch
Freeze into an owned ValueBatch.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for ValueBatchMut<'a>
impl<'a> Freeze for ValueBatchMut<'a>
impl<'a> RefUnwindSafe for ValueBatchMut<'a>
impl<'a> Send for ValueBatchMut<'a>
impl<'a> Sync for ValueBatchMut<'a>
impl<'a> Unpin for ValueBatchMut<'a>
impl<'a> UnsafeUnpin for ValueBatchMut<'a>
Blanket Implementations§
impl<T> Allocation for T
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> ForeignBufferOwner for 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> ⓘ
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