-
Notifications
You must be signed in to change notification settings - Fork 0
/
clique.hh
63 lines (51 loc) · 1.06 KB
/
clique.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef CLIQUE_HH
#define CLIQUE_HH
#include <cstddef>
#include "clique_1.hh"
#include "clique_2.hh"
#include "clique_3.hh"
#include "clique_4.hh"
#include "clique_5.hh"
namespace cct
{
template< std::size_t SizeClique >
class Clique
{
private:
std::size_t quantity_cliques{ 0u };
public:
consteval Clique( auto graph )
{
switch( SizeClique )
{
case 1u:
quantity_cliques = cct::Clique_1{ graph }();
break;
case 2u:
quantity_cliques = cct::Clique_2{ graph }();
break;
case 3u:
quantity_cliques = cct::Clique_3{ graph }();
break;
case 4u:
quantity_cliques = cct::Clique_4{ graph }();
break;
case 5u:
quantity_cliques = cct::Clique_5{ graph }();
break;
}
}
auto
consteval operator()( void ) const
{
return quantity_cliques;
}
};
template< std::size_t SizeClique >
auto
consteval clique( auto graph )
{
return Clique< SizeClique >{ graph }();
}
}
#endif