pub struct Sample<'a, T> {
pub bits: &'a [bool],
pub energy: T,
}Expand description
An assignment of a QUBO model’s variables and its energy, borrowed from a sampler.
Use bits.to_vec() to keep the assignment beyond the next sampler call.
Fields§
§bits: &'a [bool]The value of each variable, by index.
energy: TThe energy of bits under the model. Exact for i64.
Trait Implementations§
impl<'a, T: Copy> Copy for Sample<'a, T>
impl<'a, T: PartialEq> StructuralPartialEq for Sample<'a, T>
Auto Trait Implementations§
impl<'a, T> Forget for Sample<'a, T>
impl<'a, T> Freeze for Sample<'a, T>where
T: Freeze,
impl<'a, T> Move for Sample<'a, T>
impl<'a, T> RefUnwindSafe for Sample<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Sample<'a, T>where
T: Send,
impl<'a, T> Sync for Sample<'a, T>where
T: Sync,
impl<'a, T> Unpin for Sample<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for Sample<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for Sample<'a, T>where
T: UnwindSafe,
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