pub struct Address(pub String);Expand description
A unique identifier for random variables and observation sites in probabilistic models. Addresses serve as stable names for probabilistic choices, enabling conditioning, inference, and replay. They are implemented as wrapped strings with ordering and hashing support for use in collections.
Example:
use fugue::*;
// Create addresses using the addr! macro
let addr1 = addr!("parameter");
let addr2 = addr!("data", 5);
// Addresses can be compared and used in collections
use std::collections::HashMap;
let mut map = HashMap::new();
map.insert(addr1, 1.0);
map.insert(addr2, 2.0);Tuple Fields§
§0: StringTrait Implementations§
Source§impl Ord for Address
impl Ord for Address
Source§impl PartialOrd for Address
impl PartialOrd for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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