Skip to main content

ClosestVectorTarget

Trait ClosestVectorTarget 

Source
pub trait ClosestVectorTarget:
    Clone
    + Debug
    + 'static {
    const NAME: &'static str;

    // Required methods
    fn validate(&self, index: usize) -> Result<(), ConstructionError>;
    fn to_f64(&self) -> Result<f64, EvaluationError>;
}
Expand description

Target coordinate domains supported by ClosestVectorProblem.

Required Associated Constants§

Source

const NAME: &'static str

Registered value of the target variant dimension.

Required Methods§

Source

fn validate(&self, index: usize) -> Result<(), ConstructionError>

Validate one stored target coordinate.

Source

fn to_f64(&self) -> Result<f64, EvaluationError>

Convert one coordinate for numerical evaluation and solving.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ClosestVectorTarget for f64

Source§

const NAME: &'static str = "f64"

Source§

fn validate(&self, index: usize) -> Result<(), ConstructionError>

Source§

fn to_f64(&self) -> Result<f64, EvaluationError>

Source§

impl ClosestVectorTarget for i64

Source§

const NAME: &'static str = "i64"

Source§

fn validate(&self, _index: usize) -> Result<(), ConstructionError>

Source§

fn to_f64(&self) -> Result<f64, EvaluationError>

Implementors§