topsis

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package topsis implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) multi-criteria decision analysis algorithm, used e.g. for selecting which Proxmox node to place a VM on

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alternative

type Alternative struct {
	ID      string
	Metrics []float64
}

Alternative represents a candidate solution with multiple criteria values

type BenefitFlags

type BenefitFlags []bool

BenefitFlags indicates whether higher is better (true) or lower is better (false)

type Result

type Result struct {
	ID    string
	Score float64
}

Result contains the TOPSIS score and ranking for each alternative

func Rank

func Rank(alternatives []Alternative, weights Weights, benefits BenefitFlags) ([]Result, error)

Rank performs TOPSIS ranking on alternatives based on weights and benefit flags

type Weights

type Weights []float64

Weights represents the importance of each criterion (higher = more important)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL