electreIII

package
v0.0.0-...-4dcd76e Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDistillationFunc = utils.LinearFunctionParameters{A: -.15, B: .3}

Functions

func ElectreIII

func ElectreIII(
	alternatives []AlternativeWithCriteria,
	criteria Criteria,
	electreCriteria *ElectreCriteria,
	distillationFun *utils.LinearFunctionParameters,
) *AlternativesRanking

func EvaluateRanking

func EvaluateRanking(ascending, descending *[]int, alternatives *[]AlternativeWithCriteria) *AlternativesRanking

func Max

func Max(values *[]int) int

func RankAscending

func RankAscending(matrix *AlternativesMatrix, distillationFun *utils.LinearFunctionParameters) *[]int

func RankDescending

func RankDescending(matrix *AlternativesMatrix, distillationFun *utils.LinearFunctionParameters) *[]int

Types

type AlternativesMatrix

type AlternativesMatrix struct {
	Alternatives *Alternatives `json:"alternatives"`
	Values       *Matrix       `json:"values"`
}

type CompareFunction

type CompareFunction = func(old int, new int) bool

type ElectreCriteria

type ElectreCriteria = map[string]ElectreCriterion

type ElectreCriterion

type ElectreCriterion struct {
	K float64                        `json:"k"`
	Q utils.LinearFunctionParameters `json:"q"`
	P utils.LinearFunctionParameters `json:"p"`
	V utils.LinearFunctionParameters `json:"v"`
}

type ElectreIIIBiasLIstener

type ElectreIIIBiasLIstener struct {
}

func (*ElectreIIIBiasLIstener) Identifier

func (e *ElectreIIIBiasLIstener) Identifier() string

func (*ElectreIIIBiasLIstener) Merge

func (*ElectreIIIBiasLIstener) OnCriteriaRemoved

func (e *ElectreIIIBiasLIstener) OnCriteriaRemoved(
	leftCriteria *model.Criteria,
	params model.MethodParameters,
) model.MethodParameters

func (*ElectreIIIBiasLIstener) OnCriterionAdded

func (e *ElectreIIIBiasLIstener) OnCriterionAdded(
	criterion *model.Criterion,
	referenceCriterion *model.Criterion,
	params model.MethodParameters,
	generator utils.ValueGenerator,
) model.AddedCriterionParams

func (*ElectreIIIBiasLIstener) RankCriteriaAscending

func (e *ElectreIIIBiasLIstener) RankCriteriaAscending(params *model.DecisionMakingParams) *model.WeightedCriteria

type ElectreIIIEvaluation

type ElectreIIIEvaluation struct {
	AscendingIndex  int `json:"ascendingIndex"`
	DescendingIndex int `json:"descendingIndex"`
}

type ElectreIIIInputParams

type ElectreIIIInputParams struct {
	Criteria        ElectreCriteria                `json:"criteria"`
	DistillationFun utils.LinearFunctionParameters `json:"distillationFun,omitempty"`
}

type ElectreIIIPreferenceFunc

type ElectreIIIPreferenceFunc struct {
}

func (*ElectreIIIPreferenceFunc) Evaluate

func (e *ElectreIIIPreferenceFunc) Evaluate(dmp *DecisionMakingParams) *AlternativesRanking

func (*ElectreIIIPreferenceFunc) Identifier

func (e *ElectreIIIPreferenceFunc) Identifier() string

func (*ElectreIIIPreferenceFunc) MethodParameters

func (e *ElectreIIIPreferenceFunc) MethodParameters() interface{}

func (*ElectreIIIPreferenceFunc) ParseParams

func (e *ElectreIIIPreferenceFunc) ParseParams(dm *model.DecisionMaker) interface{}

type ElectreResult

type ElectreResult struct {
	C float64 `json:"c"`
	D float64 `json:"d"`
}

type Matrix

type Matrix struct {
	Size int
	Data []float64
}

func NewMatrix

func NewMatrix(values *[][]float64) *Matrix

func (*Matrix) At

func (m *Matrix) At(row, col int) float64

func (*Matrix) Filter

func (m *Matrix) Filter(filter func(row, col int, v float64) bool) *Matrix

func (*Matrix) FindBest

func (m *Matrix) FindBest(isBetter func(old, new float64) bool) float64

func (*Matrix) Matches

func (m *Matrix) Matches(groupsNumber int, groupEvaluator func(row, col int) int, predicate func(value float64) bool) []int

func (*Matrix) MatchesInColumn

func (m *Matrix) MatchesInColumn(predicate func(value float64) bool) []int

func (*Matrix) MatchesInRow

func (m *Matrix) MatchesInRow(predicate func(value float64) bool) []int

func (*Matrix) Max

func (m *Matrix) Max() float64

func (*Matrix) Min

func (m *Matrix) Min() float64

func (*Matrix) Slice

func (m *Matrix) Slice(indices *[]int) *Matrix

func (*Matrix) String

func (m *Matrix) String() string

func (*Matrix) Without

func (m *Matrix) Without(indices *[]int) *Matrix

Jump to

Keyboard shortcuts

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