#[non_exhaustive]pub struct SampleSet {
pub objectives: Option<SampledValues>,
pub decision_variables: Vec<SampledDecisionVariable>,
pub constraints: Vec<SampledConstraint>,
pub named_functions: Vec<SampledNamedFunction>,
pub feasible: HashMap<u64, bool>,
pub feasible_unrelaxed: HashMap<u64, bool>,
pub feasible_relaxed: HashMap<u64, bool>,
pub sense: i32,
pub metadata: Option<ProcessMetadata>,
pub annotations: HashMap<String, String>,
pub format_version: u32,
}Expand description
Output of the sampling process.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.objectives: Option<SampledValues>§decision_variables: Vec<SampledDecisionVariable>§constraints: Vec<SampledConstraint>§named_functions: Vec<SampledNamedFunction>§feasible: HashMap<u64, bool>Feasibility for both remaining and removed constraints of each sample.
The meaning of feasible field in SDK changes between
Python SDK 1.6.0 to 1.7.0.
In Python SDK 1.6.0, feasible represents the feasibility of
remaining constraints of each sample,
i.e. removed constraints (introduced in 1.6.0) are not considered.
After Python SDK 1.7.0, feasible represents the feasibility of
all constraints of each sample.
The feasibility of 1.6.0 is renamed to feasible_relaxed in 1.7.0.
feasible_unrelaxed: HashMap<u64, bool>[Deprecated] This field has been introduced in Python SDK 1.6.0
to represent the feasibility of all constraints of each sample.
The feasible field is used in this sense after Python SDK 1.7.0.
feasible_relaxed: HashMap<u64, bool>Feasibility for remaining (non-removed) constraints of each sample.
sense: i32Minimize or Maximize
metadata: Option<ProcessMetadata>OMMX-defined provenance metadata for this SampleSet.
annotations: HashMap<String, String>User-defined or third-party extension annotations.
OMMX-reserved metadata must use explicit fields such as metadata.
Keys in this map must be valid reverse-domain names and must not start with
org.ommx.v1..
format_version: u32Format version of this message for forward compatibility checks.
See Instance.format_version for semantics.
Implementations§
Trait Implementations§
Source§impl From<SampleSet> for SampleSet
Lossy: v1::SampleSet only has a constraints field for regular
sampled constraints — it has no fields for indicator / one-hot / sos1
sampled constraints, so any data the in-memory SampleSet holds in
those collections is dropped on serialization. This is a wire-format
limitation that pre-dates the label/context SoA refactor; the matching
Parse impl above initializes those collections to
Default::default() for symmetry. Round-trip through to_v1_bytes /
from_v1_bytes preserves variable labels and regular-constraint context.
impl From<SampleSet> for SampleSet
Lossy: v1::SampleSet only has a constraints field for regular
sampled constraints — it has no fields for indicator / one-hot / sos1
sampled constraints, so any data the in-memory SampleSet holds in
those collections is dropped on serialization. This is a wire-format
limitation that pre-dates the label/context SoA refactor; the matching
Parse impl above initializes those collections to
Default::default() for symmetry. Round-trip through to_v1_bytes /
from_v1_bytes preserves variable labels and regular-constraint context.
Source§impl Message for SampleSet
impl Message for SampleSet
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.impl StructuralPartialEq for SampleSet
Auto Trait Implementations§
impl Freeze for SampleSet
impl RefUnwindSafe for SampleSet
impl Send for SampleSet
impl Sync for SampleSet
impl Unpin for SampleSet
impl UnsafeUnpin for SampleSet
impl UnwindSafe for SampleSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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