1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! The `mcdm` crate offers a set of utilities for implementing Multiple-Criteria Decision Making
//! (MCDM) techniques in Rust, enabling users to analyze and rank alternatives based on multiple
//! conflicting criteria.
//!
//! # Example
//!
//! ```rust
//! use mcdm::{McdmError, Rank, Normalize, Weight, CriteriaTypes};
//! use nalgebra::dmatrix;
//!
//! fn main() -> Result<(), McdmError> {
//! // Define the decision matrix (alternatives x criteria)
//! let alternatives = dmatrix![4.0, 7.0, 8.0; 2.0, 9.0, 6.0; 3.0, 6.0, 9.0];
//! let criteria_types = CriteriaTypes::from_slice(&[-1, 1, 1])?;
//!
//! // Apply normalization using Min-Max
//! let normalized_matrix = alternatives.normalize_min_max(&criteria_types)?;
//!
//! // Alternatively, use equal weights
//! let equal_weights = normalized_matrix.weight_equal()?;
//!
//! // Apply the TOPSIS method for ranking
//! let ranking = normalized_matrix.rank_topsis(&equal_weights)?;
//!
//! // Output the ranking
//! println!("Ranking: {:.3}", ranking);
//! // Ranking:
//! // ┌ ┐
//! // │ 0.626 │
//! // │ 0.414 │
//! // │ 0.500 │
//! // └ ┘
//!
//! Ok(())
//! }
//! ```
extern crate std;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;
pub use crate*;