Matrix.
add_continuous_criteria
Add multiple continuous criteria into the matrix to evaluate each choice against.
*criteria (str) – Names of the criteria to add.
weights (tuple[float]) – How important the criteria are (usually on a 0-10 scale), in order of declaration.
ValueError – If any given weight value is zero.
ValueError
Examples
>>> import matrix >>> m = matrix.Matrix() >>> m.add_continuous_criteria('price', 'size', weights=(5, 2)) >>> m | | price | size | |:-------|--------:|-------:| | Weight | 5 | 2 |
>>> m.continuous_criteria ['price', 'size']