use-case-and-architecture/ai_computing_force_scheduling/knets_pkg/algo/algo.go
Weisen Pan a877aed45f AI-based CFN Traffic Control and Computer Force Scheduling
Change-Id: I16cd7730c1e0732253ac52f51010f6b813295aa7
2023-11-03 00:09:19 -07:00

18 lines
443 B
Go

package algo
// Author: Weisen Pan
// Date: 2023-10-24
// SchedulingQueueSort is an interface for sorting pods in a scheduling queue.
type SchedulingQueueSort interface {
// Len returns the number of pods in the scheduling queue.
Len() int
// Swap swaps the positions of two pods in the scheduling queue.
Swap(i, j int)
// Less returns true if the pod at index i should be scheduled before the pod at index j.
Less(i, j int) bool
}