Program Listing for File HouseProblems.h
↰ Return to documentation for file (ADS/optimization/HouseProblems.h)
/*--------------------------------------------------------------------------*/
/*-------------------------- File HouseProblems.h --------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_HouseProblems
#define __ADS_HouseProblems
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include <algorithm>
#include <cstddef>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
template< class T >
T maxNonAdjacentSum( const std::vector< T > & A );
template< class T >
std::pair< T , std::vector< std::size_t > > nonAdjacentSelection(
const std::vector< T > & A );
template< class T >
std::pair< T , std::vector< std::size_t > > paintHouses(
const std::vector< std::vector< T > > & cost );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/optimization/impl/HouseProblems.tpp"
/*--------------------------------------------------------------------------*/
#endif /* HouseProblems.h included */
/*--------------------------------------------------------------------------*/
/*------------------------ End File HouseProblems.h ------------------------*/
/*--------------------------------------------------------------------------*/