#include <iostream>
#include <list>
Classes | |
class | ENDPOINT |
class | INTERVAL |
This class represents a closed interval object. An interval is a pair of double values [x,y], representing all values (of type double) starting from x to y. We name them the left and the right of the interval. Also, we ca associate a cost (weight) to an interval. More... | |
struct | SortTable |
class | INVALID_INTERVAL |
Functions | |
bool | operator== (const ENDPOINT &x, const ENDPOINT &y) |
bool | operator<= (const ENDPOINT &x, const ENDPOINT &y) |
bool | operator< (const ENDPOINT &x, const ENDPOINT &y) |
bool | operator> (const ENDPOINT &x, const ENDPOINT &y) |
bool | operator>= (const ENDPOINT &x, const ENDPOINT &y) |
bool | operator== (const INTERVAL &I, const INTERVAL &J) |
bool | operator< (const INTERVAL &I, const INTERVAL &J) |
bool | operator> (const INTERVAL &I, const INTERVAL &J) |
int | lexicographic_compare (const ENDPOINT &, const ENDPOINT &) |
int | MAXIMAL_STABLE_SET_IG (const std::list< INTERVAL > &intervals, int *colour) |
int MAXIMAL_STABLE_SET_IG | ( | const std::list< INTERVAL > & | intervals, | |
int * | colour | |||
) |
This function implements the algorithm described in U.I. Gupta, D.T. Lee, J.-T Leung. An optimal solution for the channel-assignment problem; IEEE Transactions on Computers C-28(1979), 807-810
It computes the minimal number of colour for a set of intervals. Two interfering intervals should not have the same colour. The algorithms runs in .
[in] | intervals | A list containing the intervals to be processed |
[out] | colour | ![]() ![]() |