Program Listing for File Properties.h
↰ Return to documentation for file (ADS/graph/Properties.h)
/*--------------------------------------------------------------------------*/
/*--------------------------- File Properties.h ----------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_Properties
#define __ADS_Properties
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include "ADS/graph/Graph.h"
#include "ADS/graph/Visit.h"
#include "ADS/tree/BinaryTree.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <utility>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
/*--------------------------------------------------------------------------*/
/*--------------------------------- TREES ----------------------------------*/
/*--------------------------------------------------------------------------*/
template< Graph G >
bool isTree( const G & g );
template< Graph G >
int diameter( const G & g );
template< Graph G >
int treeDiameter( const G & g );
template< class T >
std::pair< int , int > treeDiameter( const BinaryTree< T > * t );
template< Graph G >
std::vector< int > treeVertexCover( const G & g );
/*--------------------------------------------------------------------------*/
/*------------------------------- STRUCTURE --------------------------------*/
/*--------------------------------------------------------------------------*/
template< Graph G >
std::int64_t countTriangles( const G & g );
template< Graph G >
std::optional< std::vector< int > > twoColoring( const G & g );
template< class T >
int universalSink( const std::vector< std::vector< T > > & A );
template< Graph G >
std::optional< std::vector< int > > uniqueTopologicalOrder( const G & g );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/graph/impl/Properties.tpp"
/*--------------------------------------------------------------------------*/
#endif /* Properties.h included */
/*--------------------------------------------------------------------------*/
/*------------------------- End File Properties.h --------------------------*/
/*--------------------------------------------------------------------------*/