mcdm::validation

Trait MatrixValidate

Source
pub trait MatrixValidate {
    // Required methods
    fn is_bounds_valid(&self) -> Result<(), ValidationError>;
    fn is_reference_ideal_bounds_valid(
        &self,
        bounds: &DMatrix<f64>,
    ) -> Result<(), ValidationError>;
    fn is_within_bounds(
        &self,
        bounds: &DMatrix<f64>,
    ) -> Result<(), ValidationError>;
}

Required Methods§

Source

fn is_bounds_valid(&self) -> Result<(), ValidationError>

Validates the bounds for each criteria follows the form $[min, max]$.

Source

fn is_reference_ideal_bounds_valid( &self, bounds: &DMatrix<f64>, ) -> Result<(), ValidationError>

Validates the reference ideal array aligns with the given bounds for each criterion.

Validations:

  1. Ensure ref_ideal has a shape of [M, 2], where M is the number of criteria.
  2. Ensure shape of ref_ideal and bounds are the same.
  3. Verifies all ref_ideal values lie within the bounds array and that the ref_ideal values are in scending order (i.e., [min, max]).
Source

fn is_within_bounds(&self, bounds: &DMatrix<f64>) -> Result<(), ValidationError>

Ensures a DMatrix is within the specified bounds.

Implementations on Foreign Types§

Source§

impl MatrixValidate for DMatrix<f64>

Implementors§