pub struct MetalWalk<'a> { /* private fields */ }Expand description
A walk state resident on the GPU, or the states of a batch of walks of one graph.
Implementations§
Source§impl MetalWalk<'_>
impl MetalWalk<'_>
Sourcepub fn row_probabilities(&self, rows: usize) -> Vec<f64>
pub fn row_probabilities(&self, rows: usize) -> Vec<f64>
Σ_s |ψ(h, s)|² for each of the rows rows, summed in f64 by the CPU.
Sourcepub fn steps_accumulate(&mut self, n: usize) -> Result<(), GpuError>
pub fn steps_accumulate(&mut self, n: usize) -> Result<(), GpuError>
n steps (f32 states only), adding after each step the probability of every half-edge
to the accumulators (Self::accumulated): for time averages, without reading the
state back.
Sourcepub fn accumulated(&self) -> Vec<f64>
pub fn accumulated(&self) -> Vec<f64>
The accumulated probability of every half-edge.
Sourcepub fn reset_accumulated(&mut self)
pub fn reset_accumulated(&mut self)
Sets the accumulators to zero.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MetalWalk<'a>
impl<'a> !Send for MetalWalk<'a>
impl<'a> !Sync for MetalWalk<'a>
impl<'a> !UnwindSafe for MetalWalk<'a>
impl<'a> Freeze for MetalWalk<'a>
impl<'a> Unpin for MetalWalk<'a>
impl<'a> UnsafeUnpin for MetalWalk<'a>
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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<T, U> Imply<T> for U
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