The bliss C++ API
bliss_C.h
Go to the documentation of this file.
1 #ifndef BLISS_C_H
2 #define BLISS_C_H
3 
4 /*
5  Copyright (c) 2003-2021 Tommi Junttila
6  Released under the GNU Lesser General Public License version 3.
7 
8  This file is part of bliss.
9 
10  bliss is free software: you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, version 3 of the License.
13 
14  bliss is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with bliss. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
32 #include <stdlib.h>
33 #include <stdio.h>
34 
35 
40 
41 
46 typedef struct bliss_stats_struct
47 {
52  long double group_size_approx;
54  long unsigned int nof_nodes;
56  long unsigned int nof_leaf_nodes;
58  long unsigned int nof_bad_nodes;
60  long unsigned int nof_canupdates;
62  long unsigned int nof_generators;
64  unsigned long int max_level;
65 } BlissStats;
66 
67 
73 BlissGraph *bliss_new(const unsigned int N);
74 
75 
84 BlissGraph *bliss_read_dimacs(FILE *fp);
85 
86 
93 void bliss_write_dimacs(BlissGraph *graph, FILE *fp);
94 
95 
102 void bliss_release(BlissGraph *graph);
103 
104 
108 void bliss_write_dot(BlissGraph *graph, FILE *fp);
109 
110 
114 unsigned int bliss_get_nof_vertices(BlissGraph *graph);
115 
116 
122 unsigned int bliss_add_vertex(BlissGraph *graph, unsigned int c);
123 
124 
132 void bliss_add_edge(BlissGraph *graph, unsigned int v1, unsigned int v2);
133 
134 
143 int bliss_cmp(BlissGraph *graph1, BlissGraph *graph2);
144 
145 
149 unsigned int bliss_hash(BlissGraph *graph);
150 
151 
159 BlissGraph *bliss_permute(BlissGraph *graph, const unsigned int *perm);
160 
161 
177 void
179  void (*hook)(void *user_param,
180  unsigned int N,
181  const unsigned int *aut),
182  void *hook_user_param,
183  BlissStats *stats);
184 
185 
197 const unsigned int *
199  void (*hook)(void *user_param,
200  unsigned int N,
201  const unsigned int *aut),
202  void *hook_user_param,
203  BlissStats *stats);
204 
205 #endif
unsigned int bliss_get_nof_vertices(BlissGraph *graph)
Definition: bliss_C.cc:83
long unsigned int nof_leaf_nodes
The number of leaf nodes in the search tree.
Definition: bliss_C.h:56
void bliss_write_dot(BlissGraph *graph, FILE *fp)
Definition: bliss_C.cc:75
unsigned int bliss_hash(BlissGraph *graph)
Definition: bliss_C.cc:117
BlissGraph * bliss_new(const unsigned int N)
Definition: bliss_C.cc:36
The C API version of the statistics returned by the bliss search algorithm.
Definition: bliss_C.h:46
void bliss_write_dimacs(BlissGraph *graph, FILE *fp)
Definition: bliss_C.cc:58
BlissGraph * bliss_read_dimacs(FILE *fp)
Definition: bliss_C.cc:46
const unsigned int * bliss_find_canonical_labeling(BlissGraph *graph, void(*hook)(void *user_param, unsigned int N, const unsigned int *aut), void *hook_user_param, BlissStats *stats)
unsigned int bliss_add_vertex(BlissGraph *graph, unsigned int c)
Definition: bliss_C.cc:91
unsigned long int max_level
The maximal depth of the search tree.
Definition: bliss_C.h:64
long unsigned int nof_nodes
The number of nodes in the search tree.
Definition: bliss_C.h:54
void bliss_find_automorphisms(BlissGraph *graph, void(*hook)(void *user_param, unsigned int N, const unsigned int *aut), void *hook_user_param, BlissStats *stats)
The true bliss graph is hiding in this struct.
Definition: bliss_C.cc:31
void bliss_add_edge(BlissGraph *graph, unsigned int v1, unsigned int v2)
Definition: bliss_C.cc:99
long double group_size_approx
An approximation (due to possible rounding errors) of the size of the automorphism group...
Definition: bliss_C.h:52
BlissGraph * bliss_permute(BlissGraph *graph, const unsigned int *perm)
Definition: bliss_C.cc:125
void bliss_release(BlissGraph *graph)
Definition: bliss_C.cc:66
struct bliss_stats_struct BlissStats
The C API version of the statistics returned by the bliss search algorithm.
int bliss_cmp(BlissGraph *graph1, BlissGraph *graph2)
Definition: bliss_C.cc:107
long unsigned int nof_bad_nodes
The number of bad nodes in the search tree.
Definition: bliss_C.h:58
long unsigned int nof_canupdates
The number of canonical representative updates.
Definition: bliss_C.h:60
long unsigned int nof_generators
The number of generator permutations.
Definition: bliss_C.h:62