ADS
Algorithms and Data Structures
Toggle main menu visibility
Loading...
Searching...
No Matches
ShortestJobFirst.h
Go to the documentation of this file.
1
/*--------------------------------------------------------------------------*/
2
/*------------------------ File ShortestJobFirst.h -------------------------*/
3
/*--------------------------------------------------------------------------*/
42
/*--------------------------------------------------------------------------*/
43
/*----------------------------- DEFINITIONS --------------------------------*/
44
/*--------------------------------------------------------------------------*/
45
46
#ifndef __ADS_ShortestJobFirst
47
#define __ADS_ShortestJobFirst
48
/* self-identification: #endif constant */
49
50
/*--------------------------------------------------------------------------*/
51
/*------------------------------ INCLUDES ----------------------------------*/
52
/*--------------------------------------------------------------------------*/
53
54
#include "
ADS/Contract.h
"
55
56
#include <algorithm>
57
#include <cstddef>
58
#include <numeric>
59
#include <vector>
60
61
/*--------------------------------------------------------------------------*/
62
/*--------------------------- NAMESPACE ------------------------------------*/
63
/*--------------------------------------------------------------------------*/
64
65
namespace
ADS
66
{
67
82
template
<
class
T >
83
std::vector< std::size_t >
shortestJobFirst
(
const
std::vector< T > & t );
84
88
template
<
class
T >
89
T
totalCompletion
(
const
std::vector< T > & t ,
90
const
std::vector< std::size_t > & A );
91
107
template
<
class
T ,
class
W >
108
std::vector< std::size_t >
smithOrder
(
const
std::vector< T > & t ,
109
const
std::vector< W > & w );
110
114
template
<
class
T ,
class
W >
115
auto
weightedCompletion
(
const
std::vector< T > & t ,
116
const
std::vector< W > & w ,
117
const
std::vector< std::size_t > & A );
118
119
/*--------------------------------------------------------------------------*/
120
121
}
// end( namespace ADS )
122
123
/*--------------------------------------------------------------------------*/
124
/*-------------------------- IMPLEMENTATION --------------------------------*/
125
/*--------------------------------------------------------------------------*/
126
127
#include "ADS/optimization/impl/ShortestJobFirst.tpp"
128
129
/*--------------------------------------------------------------------------*/
130
131
#endif
/* ShortestJobFirst.h included */
132
133
/*--------------------------------------------------------------------------*/
134
/*---------------------- End File ShortestJobFirst.h -----------------------*/
135
/*--------------------------------------------------------------------------*/
Contract.h
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
ADS::totalCompletion
T totalCompletion(const std::vector< T > &t, const std::vector< std::size_t > &A)
the sum of the times of completion of the programs in the order ,
ADS::shortestJobFirst
std::vector< std::size_t > shortestJobFirst(const std::vector< T > &t)
the order of the programs, by increasing duration
ADS::smithOrder
std::vector< std::size_t > smithOrder(const std::vector< T > &t, const std::vector< W > &w)
the order of the programs of times and weights of least weighted sum of the times of completion,...
ADS::weightedCompletion
auto weightedCompletion(const std::vector< T > &t, const std::vector< W > &w, const std::vector< std::size_t > &A)
the sum of in the order , the time of completion of
ADS
Definition
ADT.h:96
ADS
optimization
ShortestJobFirst.h
Generated by
1.17.0