pub struct SolutionWrapper(/* private fields */);Expand description
A handle to the solution of a solve. Clones share the same solution.
The solution does not change after the solve, so the tensors that the methods give share its data, with no copy. A tensor stays valid after the handle is dropped.
Implementations§
Source§impl SolutionWrapper
impl SolutionWrapper
Sourcepub fn get_ys(&self) -> Result<Tensor, DiffsolRtError>
pub fn get_ys(&self) -> Result<Tensor, DiffsolRtError>
The solution values, as a [nout, nt, nbatch] array.
Sourcepub fn get_ts(&self) -> Result<Tensor, DiffsolRtError>
pub fn get_ts(&self) -> Result<Tensor, DiffsolRtError>
The solution times, as a [nt] array. All the lanes use the same times.
Trait Implementations§
Source§impl Clone for SolutionWrapper
impl Clone for SolutionWrapper
Source§impl Serialize for SolutionWrapper
The solution serializes as {dtype, ts, ys, sensitivities}. The values have the scalar type
of the solver, dtype, so an f32 solution keeps its values exactly as f32 (in JSON, 0.1
and not 0.10000000149011612).
impl Serialize for SolutionWrapper
The solution serializes as {dtype, ts, ys, sensitivities}. The values have the scalar type
of the solver, dtype, so an f32 solution keeps its values exactly as f32 (in JSON, 0.1
and not 0.10000000149011612).
Auto Trait Implementations§
impl !RefUnwindSafe for SolutionWrapper
impl !UnwindSafe for SolutionWrapper
impl Forget for SolutionWrapper
impl Freeze for SolutionWrapper
impl Move for SolutionWrapper
impl Send for SolutionWrapper
impl Sync for SolutionWrapper
impl Unpin for SolutionWrapper
impl UnsafeUnpin for SolutionWrapper
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.