pub struct PreferenceConfig {
pub samples: usize,
pub seed: u32,
pub strict_monotonicity: bool,
pub strict_convexity: bool,
pub epsilon: f64,
pub tolerance: f64,
pub continuity_threshold: f64,
pub calc_epsilon: f64,
pub calc_tolerance: f64,
}Expand description
Shared defaults for preference validation and local numerical evaluation.
Fields§
§samples: usizeNumber of Sobol sequence points to sample for the rationality checks.
seed: u32Seed for the Sobol sequence scrambling.
strict_monotonicity: boolWhether to enforce strict monotonicity (U(x + ep) > U(x)).
strict_convexity: boolWhether to enforce strict convexity (U(midpoint) > min(U(A), U(B))).
epsilon: f64The small increment used to compute directional changes (e.g. 1e-6).
tolerance: f64Numerical tolerance for floating-point comparisons (e.g. 1e-9).
continuity_threshold: f64The threshold marginal utility (d_epsilon -> d_U) for a continuous function.
calc_epsilon: f64Step size for numerical differentiation (e.g. 1e-7).
calc_tolerance: f64Tolerance for numerical calculations such as MU/MRS comparisons.
Trait Implementations§
Source§impl Clone for PreferenceConfig
impl Clone for PreferenceConfig
Source§fn clone(&self) -> PreferenceConfig
fn clone(&self) -> PreferenceConfig
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 moreAuto Trait Implementations§
impl Freeze for PreferenceConfig
impl RefUnwindSafe for PreferenceConfig
impl Send for PreferenceConfig
impl Sync for PreferenceConfig
impl Unpin for PreferenceConfig
impl UnsafeUnpin for PreferenceConfig
impl UnwindSafe for PreferenceConfig
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