pub struct DimensionalConfig {
pub num_dimensions: usize,
pub trit_depth: TritDepthConfig,
pub target_sparsity: f64,
pub adaptive_precision: bool,
}Expand description
Configuration for dimensional encoding
Fields§
§num_dimensions: usizeNumber of dimensions in the vector space
trit_depth: TritDepthConfigTrit depth per dimension (uniform or variable)
target_sparsity: f64Sparsity target (fraction of non-zero dimensions)
adaptive_precision: boolWhether to use adaptive precision
Implementations§
Source§impl DimensionalConfig
impl DimensionalConfig
Sourcepub fn high_precision() -> Self
pub fn high_precision() -> Self
Create a high-precision configuration
Sourcepub fn adaptive(num_dims: usize, base_depth: u8, max_depth: u8) -> Self
pub fn adaptive(num_dims: usize, base_depth: u8, max_depth: u8) -> Self
Create adaptive configuration
Sourcepub fn depth_for_dimension(&self, dim: usize) -> u8
pub fn depth_for_dimension(&self, dim: usize) -> u8
Get trit depth for a specific dimension
Sourcepub fn total_capacity_bits(&self) -> f64
pub fn total_capacity_bits(&self) -> f64
Calculate total information capacity in bits
Sourcepub fn expected_storage_bytes(&self) -> usize
pub fn expected_storage_bytes(&self) -> usize
Calculate expected storage size in bytes (sparse representation)
Trait Implementations§
Source§impl Clone for DimensionalConfig
impl Clone for DimensionalConfig
Source§fn clone(&self) -> DimensionalConfig
fn clone(&self) -> DimensionalConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 DimensionalConfig
impl Debug for DimensionalConfig
Source§impl Default for DimensionalConfig
impl Default for DimensionalConfig
Source§impl<'de> Deserialize<'de> for DimensionalConfig
impl<'de> Deserialize<'de> for DimensionalConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DimensionalConfig
impl RefUnwindSafe for DimensionalConfig
impl Send for DimensionalConfig
impl Sync for DimensionalConfig
impl Unpin for DimensionalConfig
impl UnwindSafe for DimensionalConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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