-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclique.h
32 lines (23 loc) · 968 Bytes
/
clique.h
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
#ifndef CLIQUE_H_INCLUDED
#define CLIQUE_H_INCLUDED
#include <stdbool.h>
#include "graph.h"
/*
* Generate all maximal cliques, calling the given callback for each
* one with an additional user-provided context argument. If callback
* ever returns non-zero, returns immediately with that return
* value. May also return -1 on some internal allocation
* error. Otherwise, returns 0 on succesful completion.
*
* The callback function should not store copies of the nodes argument;
* the array should be copied if necessary.
*
* The struct Graph must have been created with all of the flags
* GRAPH_NOLOOP|GRAPH_DUAL|GRAPH_NOPARALLEL.
*
*/
int
component_iterate_maximal_cliques(const struct Component *comp, int (*cb)(const struct Node **nodes, size_t count, void *ctx), void *ctx);
int
graph_iterate_maximal_cliques(const struct Graph *gra, int (*cb)(const struct Node **nodes, size_t count, void *ctx), void *ctx);
#endif /* !CLIQUE_H_INCLUDED */