ADS
Algorithms and Data Structures
Toggle main menu visibility
Loading...
Searching...
No Matches
Intervals.h
Go to the documentation of this file.
1
/*--------------------------------------------------------------------------*/
2
/*---------------------------- File Intervals.h ----------------------------*/
3
/*--------------------------------------------------------------------------*/
37
/*--------------------------------------------------------------------------*/
38
/*----------------------------- DEFINITIONS --------------------------------*/
39
/*--------------------------------------------------------------------------*/
40
41
#ifndef __ADS_Intervals
42
#define __ADS_Intervals
43
/* self-identification: #endif constant */
44
45
/*--------------------------------------------------------------------------*/
46
/*------------------------------ INCLUDES ----------------------------------*/
47
/*--------------------------------------------------------------------------*/
48
49
#include "
ADS/Contract.h
"
50
51
#include <algorithm>
52
#include <cmath>
53
#include <cstddef>
54
#include <numeric>
55
#include <utility>
56
#include <vector>
57
58
/*--------------------------------------------------------------------------*/
59
/*--------------------------- NAMESPACE ------------------------------------*/
60
/*--------------------------------------------------------------------------*/
61
62
namespace
ADS
63
{
64
83
inline
std::vector< std::size_t >
84
independentSet
(
const
std::vector< std::pair< long , long > > & I );
85
112
inline
std::vector< int >
113
intervalColoring
(
const
std::vector< std::pair< long , long > > & I );
114
134
inline
std::vector< double >
towers
( std::vector< double > k ,
double
d );
135
136
/*--------------------------------------------------------------------------*/
137
138
}
// end( namespace ADS )
139
140
/*--------------------------------------------------------------------------*/
141
/*-------------------------- IMPLEMENTATION --------------------------------*/
142
/*--------------------------------------------------------------------------*/
143
144
#include "ADS/optimization/impl/Intervals.tpp"
145
146
/*--------------------------------------------------------------------------*/
147
148
#endif
/* Intervals.h included */
149
150
/*--------------------------------------------------------------------------*/
151
/*-------------------------- End File Intervals.h --------------------------*/
152
/*--------------------------------------------------------------------------*/
Contract.h
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
ADS::independentSet
std::optional< Nodes > independentSet(const Adjacency &G, int k)
nodes no two adjacent, or nothing
ADS::towers
std::vector< double > towers(std::vector< double > k, double d)
the fewest towers such that each house is within of one (the torri() of the book)
ADS::intervalColoring
std::vector< int > intervalColoring(const std::vector< std::pair< long, long > > &I)
the colors, from 0, of the intervals , the fewest possible
ADS
Definition
ADT.h:96
ADS
optimization
Intervals.h
Generated by
1.17.0