Program Listing for File LinearPartition.h

↰ Return to documentation for file (ADS/optimization/LinearPartition.h)

/*--------------------------------------------------------------------------*/
/*------------------------- File LinearPartition.h -------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef __ADS_LinearPartition
 #define __ADS_LinearPartition
                      /* self-identification: #endif constant */

/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/Contract.h"

#include <algorithm>
#include <concepts>
#include <cstddef>
#include <utility>
#include <vector>

/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/

namespace ADS {

template< class T >
std::pair< T , std::vector< std::size_t > > linearPartition(
                                  const std::vector< T > & A , std::size_t k );

template< std::integral T >
T painterPartition( const std::vector< T > & A , std::size_t k );

/*--------------------------------------------------------------------------*/

}  // end( namespace ADS )

/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/optimization/impl/LinearPartition.tpp"

/*--------------------------------------------------------------------------*/

#endif  /* LinearPartition.h included */

/*--------------------------------------------------------------------------*/
/*----------------------- End File LinearPartition.h -----------------------*/
/*--------------------------------------------------------------------------*/