HLearn-approximation-1.0.0

Safe HaskellNone

HLearn.NPHard.Scheduling

Contents

Description

See the wikipedia article for details about the Multiprocessor Scheduling problem https://en.wikipedia.org/wiki/Multiprocessor_scheduling

Synopsis

Documentation

data Scheduling n a Source

Constructors

Scheduling 

Fields

vector :: !(SortedVector a)
 
schedule :: Map Bin [a]
 

Instances

Functor (Scheduling n) 
Eq a => Eq (Scheduling n a) 
Ord a => Ord (Scheduling n a) 
Read a => Read (Scheduling n a) 
Show a => Show (Scheduling n a) 
(Ord a, Ord (Ring a), Norm a, SingI Nat n) => Monoid (Scheduling n a) 
(Ord a, Ord (Ring a), Norm a, SingI Nat n) => HomTrainer (Scheduling n a) 
HasRing (SortedVector a) => HasRing (Scheduling n a) 
(Ord a, Ord (Ring a), Norm a, SingI Nat n, Module (SortedVector a)) => Module (Scheduling n a) 
(Ord a, Ord (Ring a), Norm a, SingI Nat n) => Abelian (Scheduling n a) 
(Ord a, Ord (Ring a), Norm a, SingI Nat n, Group (SortedVector a)) => Group (Scheduling n a) 

Operations

getSchedules :: Scheduling n a -> [[a]]Source

Returns a list of all schedules. The schedules are represented by a list of the elements within them.

maxpartition :: (Ord (Ring a), Norm a) => Scheduling n a -> Ring aSource

Returns the size of the largest bin

minpartition :: (Ord (Ring a), Norm a) => Scheduling n a -> Ring aSource

Returns the size of the smallest bin

spread :: (Ord (Ring a), Norm a) => Scheduling n a -> Ring aSource

A schedule's spread is a measure of it's "goodness." The smaller the spread, the better the schedule. It is equal to maxpartition - minpartition