pub enum CardinalityClass {
Bounded(u64),
BoundedAtMost(u64),
Unbounded,
Continuous {
intervals: Vec<Interval>,
measure: ProductMeasure,
},
ContinuousAtMost {
intervals: Vec<Interval>,
measure_at_most: ProductMeasure,
},
Hybrid(Hybrid),
}Expand description
Cardinality of a comprehension’s dispense stream.
Six variants (comprehension_forms.md §6.1):
- Discrete classes enumerate distinct tuples; the count
may be known exactly (
Bounded), bounded above (BoundedAtMost), or unknown (Unbounded). - Continuous classes describe a measure-theoretic value
space; they cannot enumerate and must be sampled via an
enclosing
order(_, strategy, Some(n))per V8. - Hybrid is a cartesian whose children mix discrete and continuous axes.
Variants§
Bounded(u64)
Discrete, exactly n tuples.
BoundedAtMost(u64)
Discrete, between 0 and n tuples (post-filter).
Unbounded
Discrete, no known upper bound (generator, live stream).
Continuous
Continuous source — bounded or unbounded real intervals
with an integrable product measure. Sampled rather than
enumerated; V8 requires an enclosing
order(_, strategy, Some(n)) before reaching a
PolyStreamer.
Fields
§
measure: ProductMeasureThe measure sampled.
ContinuousAtMost
Filtered continuous source. Measure reduced by the predicate; still requires sampling.
Fields
§
measure_at_most: ProductMeasureThe measure before the predicate reduces it.
Hybrid(Hybrid)
Mixed discrete × continuous cartesian. The discrete part is enumerable; the continuous part needs sampling. V8 applies to the continuous component.
Trait Implementations§
Source§impl Clone for CardinalityClass
impl Clone for CardinalityClass
Source§fn clone(&self) -> CardinalityClass
fn clone(&self) -> CardinalityClass
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CardinalityClass
impl Debug for CardinalityClass
Source§impl<'de> Deserialize<'de> for CardinalityClass
impl<'de> Deserialize<'de> for CardinalityClass
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CardinalityClass, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CardinalityClass, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CardinalityClass
impl PartialEq for CardinalityClass
Source§impl Serialize for CardinalityClass
impl Serialize for CardinalityClass
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CardinalityClass
Auto Trait Implementations§
impl Forget for CardinalityClass
impl Freeze for CardinalityClasswhere
*const u8 is !null: Freeze,
PhantomData<Interval>: Freeze,
PhantomData<ProductMeasure>: Freeze,
PhantomData<u64>: Freeze,
impl Move for CardinalityClass
impl RefUnwindSafe for CardinalityClass
impl Send for CardinalityClasswhere
RawVecInner: Send,
impl Sync for CardinalityClasswhere
RawVecInner: Sync,
impl Unpin for CardinalityClass
impl UnsafeUnpin for CardinalityClasswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Interval>: UnsafeUnpin,
PhantomData<ProductMeasure>: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
impl UnwindSafe for CardinalityClasswhere
RawVecInner: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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