algorithm

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Alpha   = 1.0 // ResourceScore weight
	Beta    = 0.5 // StorageScore weight
	Gamma   = 0.5 // NetworkScore weight
	Delta   = 1.0 // PriceScore weight
	Epsilon = 1.0 // NodeScore weight
	Zeta    = 0.8 // PodScore weight
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm interface {
	ResourceScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
	StorageScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
	NetworkScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
	PriceScore(node ultron.WeightedNode) float64
	NodeScore(node ultron.WeightedNode) float64
	PodScore(pod ultron.WeightedPod) float64
	TotalScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64
}

type IAlgorithm

type IAlgorithm struct {
}

func NewIAlgorithm

func NewIAlgorithm() *IAlgorithm

func (*IAlgorithm) NetworkScore

func (a *IAlgorithm) NetworkScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64

func (*IAlgorithm) NodeScore

func (a *IAlgorithm) NodeScore(node ultron.WeightedNode) float64

func (*IAlgorithm) PodScore

func (a *IAlgorithm) PodScore(pod ultron.WeightedPod) float64

func (*IAlgorithm) PriceScore

func (a *IAlgorithm) PriceScore(node ultron.WeightedNode) float64

func (*IAlgorithm) ResourceScore

func (a *IAlgorithm) ResourceScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64

func (*IAlgorithm) StorageScore

func (a *IAlgorithm) StorageScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64

func (*IAlgorithm) TotalScore

func (a *IAlgorithm) TotalScore(node ultron.WeightedNode, pod ultron.WeightedPod) float64

Jump to

Keyboard shortcuts

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