[][src]Struct binjs_io::entropy::dictionary::Dictionary

pub struct Dictionary<T> { /* fields omitted */ }

Methods

impl<T> Dictionary<T>[src]

pub fn new(Options { depth: depth, width: width }: Options) -> Self[src]

Create a new dictionary using paths of depth depth and windows of width width.

pub fn bool_by_path(&self) -> Ref<PathPredict<Option<bool>, T>>[src]

pub fn string_enum_by_path(&self) -> Ref<PathPredict<SharedString, T>>[src]

pub fn interface_name_by_path(&self) -> Ref<PathPredict<InterfaceName, T>>[src]

pub fn float_by_path(&self) -> Ref<PathPredict<Option<F64>, T>>[src]

pub fn unsigned_long_by_path(&self) -> Ref<PathPredict<u32, T>>[src]

pub fn property_key_by_path(&self) -> Ref<PathPredict<Option<PropertyKey>, T>>[src]

pub fn identifier_name_by_path(
    &self
) -> Ref<PathPredict<Option<IdentifierName>, T>>
[src]

pub fn string_literal_by_path(
    &self
) -> Ref<PathPredict<Option<SharedString>, T>>
[src]

pub fn list_length_by_path(&self) -> Ref<PathPredict<Option<u32>, T>>[src]

pub fn property_key_by_window(
    &self
) -> Ref<WindowPredict<Option<PropertyKey>, T>>
[src]

pub fn identifier_name_by_window(
    &self
) -> Ref<WindowPredict<Option<IdentifierName>, T>>
[src]

pub fn string_literal_by_window(
    &self
) -> Ref<WindowPredict<Option<SharedString>, T>>
[src]

pub fn unsigned_longs(&self) -> Ref<LinearTable<u32>>[src]

pub fn string_literals(&self) -> Ref<LinearTable<Option<SharedString>>>[src]

pub fn identifier_names(&self) -> Ref<LinearTable<Option<IdentifierName>>>[src]

pub fn property_keys(&self) -> Ref<LinearTable<Option<PropertyKey>>>[src]

pub fn list_lengths(&self) -> Ref<LinearTable<Option<u32>>>[src]

pub fn floats(&self) -> Ref<LinearTable<Option<F64>>>[src]

pub fn depth(&self) -> usize[src]

Return the depth of the current dictionary.

pub fn len(&self) -> usize[src]

Return the number of states in this dictionary.

impl Dictionary<Instances>[src]

pub fn bool_by_path_mut(
    &mut self
) -> RefMut<PathPredict<Option<bool>, Instances>>
[src]

pub fn string_enum_by_path_mut(
    &mut self
) -> RefMut<PathPredict<SharedString, Instances>>
[src]

pub fn interface_name_by_path_mut(
    &mut self
) -> RefMut<PathPredict<InterfaceName, Instances>>
[src]

pub fn float_by_path_mut(
    &mut self
) -> RefMut<PathPredict<Option<F64>, Instances>>
[src]

pub fn unsigned_long_by_path_mut(
    &mut self
) -> RefMut<PathPredict<u32, Instances>>
[src]

pub fn property_key_by_path_mut(
    &mut self
) -> RefMut<PathPredict<Option<PropertyKey>, Instances>>
[src]

pub fn identifier_name_by_path_mut(
    &mut self
) -> RefMut<PathPredict<Option<IdentifierName>, Instances>>
[src]

pub fn string_literal_by_path_mut(
    &mut self
) -> RefMut<PathPredict<Option<SharedString>, Instances>>
[src]

pub fn list_length_by_path_mut(
    &mut self
) -> RefMut<PathPredict<Option<u32>, Instances>>
[src]

pub fn property_key_by_window_mut(
    &mut self
) -> RefMut<WindowPredict<Option<PropertyKey>, Instances>>
[src]

pub fn identifier_name_by_window_mut(
    &mut self
) -> RefMut<WindowPredict<Option<IdentifierName>, Instances>>
[src]

pub fn string_literal_by_window_mut(
    &mut self
) -> RefMut<WindowPredict<Option<SharedString>, Instances>>
[src]

pub fn with_grammar_fallback(&self, fallback: Dictionary<Instances>) -> Self[src]

Combine a dictionary obtained by sampling (self) and a baseline dictionary (obtained by entropy::baseline) to produce a dictionary able to handle values that grammatically correct but have not been witnessed during sampling.

Trait Implementations

impl<T: Clone> Clone for Dictionary<T>[src]

impl<T: Debug> Debug for Dictionary<T>[src]

impl<'de, T> Deserialize<'de> for Dictionary<T> where
    T: Deserialize<'de>, 
[src]

impl InstancesToProbabilities for Dictionary<Instances>[src]

type AsProbabilities = Dictionary<SymbolInfo>

fn instances_to_probabilities(
    &self,
    _description: &str
) -> Dictionary<SymbolInfo>
[src]

Convert a dictionary counting instances into a dictionary that counts probabilities.

impl<T> Serialize for Dictionary<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Dictionary<T>

impl<T> !Send for Dictionary<T>

impl<T> !Sync for Dictionary<T>

impl<T> Unpin for Dictionary<T>

impl<T> !UnwindSafe for Dictionary<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]