Program Listing for File WeightedIntervals.h
↰ Return to documentation for file (ADS/optimization/WeightedIntervals.h)
/*--------------------------------------------------------------------------*/
/*------------------------ File WeightedIntervals.h ------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_WeightedIntervals
#define __ADS_WeightedIntervals
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include <algorithm>
#include "ADS/Contract.h"
#include <algorithm>
#include <cstddef>
#include <numeric>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
template< class W >
struct WeightedInterval {
long long a , b;
W w;
};
template< class W >
std::pair< std::vector< std::size_t > , W > maxinterval(
const std::vector< WeightedInterval< W > > & I );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/optimization/impl/WeightedIntervals.tpp"
/*--------------------------------------------------------------------------*/
#endif /* WeightedIntervals.h included */
/*--------------------------------------------------------------------------*/
/*---------------------- End File WeightedIntervals.h ----------------------*/
/*--------------------------------------------------------------------------*/