1 |
commit: c9e7aeca7d21e133bb1eea3132997c851ef1d069 |
2 |
Author: Christoph Junghans <junghans <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 1 18:16:50 2017 +0000 |
4 |
Commit: Christoph Junghans <junghans <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 1 18:17:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9e7aeca |
7 |
|
8 |
sci-libs/bliss: remove old |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
sci-libs/bliss/Manifest | 1 - |
13 |
sci-libs/bliss/bliss-0.72.ebuild | 44 -- |
14 |
sci-libs/bliss/files/bliss-0.72-autotools.patch | 159 ------ |
15 |
sci-libs/bliss/files/bliss-0.72-fedora.patch | 648 ------------------------ |
16 |
4 files changed, 852 deletions(-) |
17 |
|
18 |
diff --git a/sci-libs/bliss/Manifest b/sci-libs/bliss/Manifest |
19 |
index 9cd37a6..cb6cbc2 100644 |
20 |
--- a/sci-libs/bliss/Manifest |
21 |
+++ b/sci-libs/bliss/Manifest |
22 |
@@ -1,2 +1 @@ |
23 |
-DIST bliss-0.72.zip 90970 SHA256 528d192b1e30722fc60f5f12c9d6c12b374d838198ae7f18fb41bedabf735ed3 SHA512 a09b3cea26e3ff5f5733f10bfaadaf6fb5a3f443e1cc306fad16af2f7b4cd97c90652315f911a324d6d71426a3d098cd5c7e5721f69c599fe2e0d6d34caa0ef5 WHIRLPOOL afbc41c04e843d383a2da8d5e26ec2882c847e8e5f1e71c05f884396fcc79eab764df628523336b88e0c6ef4fbf073a52870e2c68ded428002d9391894cb53d6 |
24 |
DIST bliss-0.73.zip 94108 SHA256 f57bf32804140cad58b1240b804e0dbd68f7e6bf67eba8e0c0fa3a62fd7f0f84 SHA512 30f505945c577d8bcb265a349f5bc9d4dcd96555fa3add285199cdd95ea2710f04409008ff06432daffab62c132e884845eae7f823191407906202862509e05d WHIRLPOOL 08402453515e092604105f17f5889d252c0207fa31a1125e87e04c4792cbeb77b7a585a134fd2b3108e8620bbd643cd8b7826dee8a56cf47908a922298b70ad1 |
25 |
|
26 |
diff --git a/sci-libs/bliss/bliss-0.72.ebuild b/sci-libs/bliss/bliss-0.72.ebuild |
27 |
deleted file mode 100644 |
28 |
index dea3e3c..00000000 |
29 |
--- a/sci-libs/bliss/bliss-0.72.ebuild |
30 |
+++ /dev/null |
31 |
@@ -1,44 +0,0 @@ |
32 |
-# Copyright 1999-2015 Gentoo Foundation |
33 |
-# Distributed under the terms of the GNU General Public License v2 |
34 |
-# $Id$ |
35 |
- |
36 |
-EAPI=5 |
37 |
- |
38 |
-AUTOTOOLS_AUTORECONF=1 |
39 |
- |
40 |
-inherit autotools-utils |
41 |
- |
42 |
-SRC_URI="http://www.tcs.hut.fi/Software/${PN}/${P}.zip" |
43 |
-DESCRIPTION="A Tool for Computing Automorphism Groups and Canonical Labelings of Graphs" |
44 |
-HOMEPAGE="http://www.tcs.hut.fi/Software/bliss/index.shtml" |
45 |
- |
46 |
-LICENSE="GPL-3" |
47 |
-SLOT="0" |
48 |
-KEYWORDS="~amd64 ~x86" |
49 |
-IUSE="doc gmp static-libs" |
50 |
- |
51 |
-RDEPEND="gmp? ( dev-libs/gmp:0= )" |
52 |
- |
53 |
-DEPEND="${RDEPEND} |
54 |
- doc? ( app-doc/doxygen )" |
55 |
- |
56 |
-AUTOTOOLS_PRUNE_LIBTOOL_FILES="all" #comes with pkg-config file |
57 |
- |
58 |
-PATCHES=( |
59 |
- "${FILESDIR}/${P}-fedora.patch" |
60 |
- "${FILESDIR}/${P}-autotools.patch" |
61 |
-) |
62 |
- |
63 |
-src_configure() { |
64 |
- local myeconfargs=( $(use_with gmp) ) |
65 |
- autotools-utils_src_configure |
66 |
-} |
67 |
- |
68 |
-src_compile() { |
69 |
- autotools-utils_src_compile all $(usex doc html "") |
70 |
-} |
71 |
- |
72 |
-src_install() { |
73 |
- use doc && HTML_DOCS=( "${BUILD_DIR}"/html/. ) |
74 |
- autotools-utils_src_install |
75 |
-} |
76 |
|
77 |
diff --git a/sci-libs/bliss/files/bliss-0.72-autotools.patch b/sci-libs/bliss/files/bliss-0.72-autotools.patch |
78 |
deleted file mode 100644 |
79 |
index 30006b9..00000000 |
80 |
--- a/sci-libs/bliss/files/bliss-0.72-autotools.patch |
81 |
+++ /dev/null |
82 |
@@ -1,159 +0,0 @@ |
83 |
-Replace simple Makefile by autotools |
84 |
-- allow shared library |
85 |
-- parallel build |
86 |
-- added pkg-config support |
87 |
- |
88 |
-Author: Christoph Junghans <junghans@g.o> |
89 |
- |
90 |
-diff -Naur bliss-0.72-fedora/config/.dummy bliss-0.72/config/.dummy |
91 |
---- bliss-0.72-fedora/config/.dummy 1969-12-31 17:00:00.000000000 -0700 |
92 |
-+++ bliss-0.72/config/.dummy 2013-04-28 14:43:06.143760368 -0600 |
93 |
-@@ -0,0 +1 @@ |
94 |
-+Dummy file to make patch create config dir, which is needed for autotools |
95 |
-diff -Naur bliss-0.72-fedora/configure.ac bliss-0.72/configure.ac |
96 |
---- bliss-0.72-fedora/configure.ac 1969-12-31 17:00:00.000000000 -0700 |
97 |
-+++ bliss-0.72/configure.ac 2013-04-28 14:40:42.283242722 -0600 |
98 |
-@@ -0,0 +1,31 @@ |
99 |
-+AC_PREREQ([2.65]) |
100 |
-+AC_INIT([bliss], [0.72], [Tommi.Junttil@××.fi]) |
101 |
-+ |
102 |
-+AC_CONFIG_AUX_DIR(config) |
103 |
-+AC_CONFIG_MACRO_DIR(config) |
104 |
-+ |
105 |
-+AM_INIT_AUTOMAKE([1.8 foreign]) |
106 |
-+ |
107 |
-+SHARED_VERSION_INFO="1:0:0" |
108 |
-+AC_SUBST(SHARED_VERSION_INFO) |
109 |
-+ |
110 |
-+# Checks for programs. |
111 |
-+AC_PROG_CXX |
112 |
-+ |
113 |
-+LT_INIT |
114 |
-+# Checks for libraries. |
115 |
-+AC_ARG_WITH([gmp], |
116 |
-+ [AS_HELP_STRING([--with-gmp], [enable support for GNU Multiple Precision Arithmetic Library @<:@default=check@:>@])], |
117 |
-+ [], [with_readline=no]) |
118 |
-+AS_IF([test "x$with_readline" != xno], |
119 |
-+ [AC_CHECK_HEADERS([gmp.h],,AC_MSG_ERROR([Cannot find gmp.h header])) |
120 |
-+ AC_CHECK_LIB([gmp],_init,,AC_MSG_ERROR([Cannot find gmp library])) |
121 |
-+ AC_SUBST([GMP],[-lgmp]) |
122 |
-+ [CPPFLAGS="$CPPFLAGS -DBLISS_USE_GMP"]]) |
123 |
-+ |
124 |
-+AC_CHECK_PROG(DOXYGEN,doxygen,doxygen,no) |
125 |
-+AM_CONDITIONAL(HAVE_DOXYGEN,[test .$DOXYGEN != .no]) |
126 |
-+ |
127 |
-+AC_CONFIG_FILES([Makefile]) |
128 |
-+AC_CONFIG_FILES([bliss.pc]) |
129 |
-+AC_OUTPUT |
130 |
-diff -Naur bliss-0.72-fedora/bliss.pc.in bliss-0.72/bliss.pc.in |
131 |
---- bliss-0.72-fedora/bliss.pc.in 1969-12-31 17:00:00.000000000 -0700 |
132 |
-+++ bliss-0.72/bliss.pc.in 2013-04-28 14:40:54.223285686 -0600 |
133 |
-@@ -0,0 +1,13 @@ |
134 |
-+prefix=@prefix@ |
135 |
-+exec_prefix=@exec_prefix@ |
136 |
-+libdir=@libdir@ |
137 |
-+includedir=@includedir@ |
138 |
-+ |
139 |
-+Name: bliss |
140 |
-+Description: Library for Computing Automorphism Groups and Canonical Labelings of Graphs |
141 |
-+URL: http://www.tcs.hut.fi/Software/bliss/index.shtml |
142 |
-+Version: @VERSION@ |
143 |
-+Requires: |
144 |
-+Libs: -L${libdir} -lbliss @GMP@ |
145 |
-+Libs.private: -lm |
146 |
-+Cflags: -I${includedir} |
147 |
-diff -Naur bliss-0.72-fedora/Makefile bliss-0.72/Makefile |
148 |
---- bliss-0.72-fedora/Makefile 2013-04-28 14:40:10.543128514 -0600 |
149 |
-+++ bliss-0.72/Makefile 1969-12-31 17:00:00.000000000 -0700 |
150 |
-@@ -1,57 +0,0 @@ |
151 |
--CFLAGS = -I. |
152 |
--CFLAGS += -g |
153 |
--#CFLAGS += -pg |
154 |
--CFLAGS += -Wall |
155 |
--CFLAGS += --pedantic |
156 |
--CFLAGS += -O9 |
157 |
--#CFLAGS += -DBLISS_DEBUG |
158 |
--CFLAGS += -fPIC |
159 |
-- |
160 |
--SRCS = defs.cc graph.cc partition.cc orbit.cc uintseqhash.cc heap.cc |
161 |
--SRCS += timer.cc utils.cc bliss_C.cc |
162 |
-- |
163 |
--OBJS = $(addsuffix .o, $(basename $(SRCS))) |
164 |
-- |
165 |
--GMPOBJS = $(addsuffix g, $(OBJS)) |
166 |
-- |
167 |
--LIB = |
168 |
--#LIB += /usr/lib/ccmalloc.o -ldl |
169 |
-- |
170 |
--CC = g++ |
171 |
--RANLIB = ranlib |
172 |
--AR = ar |
173 |
--BLISSLIB = libbliss.a |
174 |
-- |
175 |
--gmp: LIB += -lgmp |
176 |
--gmp: CFLAGS += -DBLISS_USE_GMP |
177 |
-- |
178 |
--normal: bliss |
179 |
--gmp: bliss_gmp |
180 |
-- |
181 |
-- |
182 |
--all:: lib bliss |
183 |
-- |
184 |
--%.o %.og: %.cc |
185 |
-- $(CC) $(CFLAGS) -c -o $@ $< |
186 |
-- |
187 |
--lib: $(OBJS) |
188 |
-- rm -f $(BLISSLIB) |
189 |
-- $(AR) cr $(BLISSLIB) $(OBJS) |
190 |
-- $(RANLIB) $(BLISSLIB) |
191 |
-- |
192 |
--lib_gmp: $(GMPOBJS) |
193 |
-- rm -f $(BLISSLIB) |
194 |
-- $(AR) cr $(BLISSLIB) $(GMPOBJS) |
195 |
-- $(RANLIB) $(BLISSLIB) |
196 |
-- |
197 |
--bliss: bliss.o lib $(OBJS) |
198 |
-- $(CC) $(CFLAGS) -o bliss bliss.o $(OBJS) $(LIB) |
199 |
-- |
200 |
--bliss_gmp: bliss.og lib_gmp $(GMPOBJS) |
201 |
-- $(CC) $(CFLAGS) -o bliss bliss.og $(GMPOBJS) $(LIB) |
202 |
-- |
203 |
-- |
204 |
--clean: |
205 |
-- rm -f bliss $(BLISSLIB) $(OBJS) bliss.o $(GMPOBJS) bliss.og |
206 |
-- |
207 |
--# DO NOT DELETE |
208 |
-diff -Naur bliss-0.72-fedora/Makefile.am bliss-0.72/Makefile.am |
209 |
---- bliss-0.72-fedora/Makefile.am 1969-12-31 17:00:00.000000000 -0700 |
210 |
-+++ bliss-0.72/Makefile.am 2013-04-28 14:47:26.944698789 -0600 |
211 |
-@@ -0,0 +1,30 @@ |
212 |
-+ACLOCAL_AMFLAGS = -I config |
213 |
-+ |
214 |
-+lib_LTLIBRARIES = libbliss.la |
215 |
-+ |
216 |
-+libbliss_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ |
217 |
-+libbliss_la_SOURCES = \ |
218 |
-+ defs.cc graph.cc partition.cc orbit.cc uintseqhash.cc heap.cc \ |
219 |
-+ timer.cc utils.cc bliss_C.cc |
220 |
-+ |
221 |
-+pkginclude_HEADERS = \ |
222 |
-+ bignum.hh bliss_C.h defs.hh graph.hh heap.hh kqueue.hh kstack.hh \ |
223 |
-+ orbit.hh partition.hh timer.hh uintseqhash.hh utils.hh |
224 |
-+ |
225 |
-+bin_PROGRAMS = bliss |
226 |
-+bliss_SOURCES = bliss.cc |
227 |
-+bliss_LDADD = libbliss.la |
228 |
-+dist_man1_MANS = bliss.1 |
229 |
-+ |
230 |
-+pkgconfigdir = $(libdir)/pkgconfig |
231 |
-+pkgconfig_DATA = bliss.pc |
232 |
-+ |
233 |
-+html-local: Doxyfile |
234 |
-+if HAVE_DOXYGEN |
235 |
-+ $(DOXYGEN) $(srcdir)/Doxyfile |
236 |
-+else |
237 |
-+ @echo "doxygen was not found, please re-run configure" |
238 |
-+endif |
239 |
-+ |
240 |
-+clean-local: |
241 |
-+ -rm -rf html |
242 |
|
243 |
diff --git a/sci-libs/bliss/files/bliss-0.72-fedora.patch b/sci-libs/bliss/files/bliss-0.72-fedora.patch |
244 |
deleted file mode 100644 |
245 |
index e1f8b66..00000000 |
246 |
--- a/sci-libs/bliss/files/bliss-0.72-fedora.patch |
247 |
+++ /dev/null |
248 |
@@ -1,648 +0,0 @@ |
249 |
-Pulled on 28-04-13 from |
250 |
-http://pkgs.fedoraproject.org/cgit/bliss.git/tree/ |
251 |
- |
252 |
-- Man page written by Jerry James using text borrowed from the sources. |
253 |
- The man page therefore has the same copyright and license as the sources. |
254 |
-- Don't call exit() in library code. |
255 |
-- Patch from Thomas Rehn, also sent upstream. Fix one bug and add one |
256 |
- performance enhancement. |
257 |
- |
258 |
-diff -Naur bliss-0.72.orig/bliss.1 bliss-0.72/bliss.1 |
259 |
---- bliss-0.72.orig/bliss.1 1969-12-31 17:00:00.000000000 -0700 |
260 |
-+++ bliss-0.72/bliss.1 2013-04-28 14:35:37.000000000 -0600 |
261 |
-@@ -0,0 +1,55 @@ |
262 |
-+.TH "BLISS" "1" "@VERSION@" "Tommi Junttila & Petteri Kaski" "User Commands" |
263 |
-+.SH "NAME" |
264 |
-+bliss \- Compute automorphism groups and canonical labelings of graphs |
265 |
-+.SH "SYNOPSIS" |
266 |
-+.B bliss |
267 |
-+[\fIOPTIONS\fR] [<\fIGRAPH FILE\fR>] |
268 |
-+.SH "DESCRIPTION" |
269 |
-+.PP |
270 |
-+Bliss is an open source tool for computing automorphism groups and |
271 |
-+canonical forms of graphs. The graphs are specified in DIMACS format. |
272 |
-+.TP |
273 |
-+\fB\-directed\fR |
274 |
-+the input graph is directed |
275 |
-+.TP |
276 |
-+\fB\-can\fR |
277 |
-+compute canonical form |
278 |
-+.TP |
279 |
-+\fB\-ocan\fR=\fIf\fR |
280 |
-+compute canonical form and output it in file \fIf\fR |
281 |
-+.TP |
282 |
-+\fB\-v\fR=\fIN\fR |
283 |
-+set verbosity level to N [N >= 0, default: 1] |
284 |
-+.TP |
285 |
-+\fB\-sh\fR=\fIX\fR |
286 |
-+select splitting heuristics, where X is: |
287 |
-+.TS |
288 |
-+tab(;); |
289 |
-+R L. |
290 |
-+f;first non-singleton cell |
291 |
-+fl;first largest non-singleton cell |
292 |
-+fs;first smallest non-singleton cell |
293 |
-+fm;first maximally non-trivially connected non-singleton cell |
294 |
-+flm;first largest maximally non-trivially connected |
295 |
-+;non-singleton cell |
296 |
-+fsm;first smallest maximally non-trivially connected |
297 |
-+;non-singleton cell (default) |
298 |
-+.TE |
299 |
-+.TP |
300 |
-+\fB\-fr\fR=\fIX\fR |
301 |
-+use failure recording? [X=y/n, default: y] |
302 |
-+.TP |
303 |
-+\fB\-cr\fR=\fIX\fR |
304 |
-+use component recursion? [X=y/n, default: y] |
305 |
-+.TP |
306 |
-+\fB\-version\fR |
307 |
-+print the version number and exit |
308 |
-+.TP |
309 |
-+\fB\-help\fR |
310 |
-+print this help and exit |
311 |
-+.SH "AUTHORS" |
312 |
-+Bliss was written by Tommi Junttila <Tommi.Junttila@×××.fi> and |
313 |
-+Petteri Kaski <petteri.kaski@×××××.fi>. |
314 |
-+.PP |
315 |
-+This man page was written by Jerry James <loganjerry@×××××.com>. |
316 |
-+It is distributed under the same terms as bliss. |
317 |
-diff -Naur bliss-0.72.orig/bliss.cc bliss-0.72/bliss.cc |
318 |
---- bliss-0.72.orig/bliss.cc 2013-04-28 14:35:20.582085167 -0600 |
319 |
-+++ bliss-0.72/bliss.cc 2013-04-28 14:36:28.792330603 -0600 |
320 |
-@@ -276,13 +276,16 @@ |
321 |
- if(opt_canonize == false) |
322 |
- { |
323 |
- /* No canonical labeling, only automorphism group */ |
324 |
-- g->find_automorphisms(stats, &report_aut, stdout); |
325 |
-+ if (!g->find_automorphisms(stats, &report_aut, stdout)) |
326 |
-+ exit(1); |
327 |
- } |
328 |
- else |
329 |
- { |
330 |
- /* Canonical labeling and automorphism group */ |
331 |
- const unsigned int* cl = g->canonical_form(stats, &report_aut, stdout); |
332 |
- |
333 |
-+ if (!cl) |
334 |
-+ exit(1); |
335 |
- fprintf(stdout, "Canonical labeling: "); |
336 |
- bliss::print_permutation(stdout, g->get_nof_vertices(), cl, 1); |
337 |
- fprintf(stdout, "\n"); |
338 |
-@@ -290,6 +293,8 @@ |
339 |
- if(opt_output_can_file) |
340 |
- { |
341 |
- bliss::AbstractGraph* cf = g->permute(cl); |
342 |
-+ if (!cf) |
343 |
-+ exit(1); |
344 |
- FILE* const fp = fopen(opt_output_can_file, "w"); |
345 |
- if(!fp) |
346 |
- _fatal("Cannot open '%s' for outputting the canonical form, aborting", opt_output_can_file); |
347 |
-diff -Naur bliss-0.72.orig/bliss_C.cc bliss-0.72/bliss_C.cc |
348 |
---- bliss-0.72.orig/bliss_C.cc 2013-04-28 14:35:20.582085167 -0600 |
349 |
-+++ bliss-0.72/bliss_C.cc 2013-04-28 14:36:28.792330603 -0600 |
350 |
-@@ -131,7 +131,7 @@ |
351 |
- } |
352 |
- |
353 |
- extern "C" |
354 |
--void |
355 |
-+int |
356 |
- bliss_find_automorphisms(BlissGraph *graph, |
357 |
- void (*hook)(void *user_param, |
358 |
- unsigned int n, |
359 |
-@@ -142,7 +142,8 @@ |
360 |
- bliss::Stats s; |
361 |
- assert(graph); |
362 |
- assert(graph->g); |
363 |
-- graph->g->find_automorphisms(s, hook, hook_user_param); |
364 |
-+ if (!graph->g->find_automorphisms(s, hook, hook_user_param)) |
365 |
-+ return 0; |
366 |
- |
367 |
- if(stats) |
368 |
- { |
369 |
-@@ -154,6 +155,7 @@ |
370 |
- stats->nof_generators = s.get_nof_generators(); |
371 |
- stats->max_level = s.get_max_level(); |
372 |
- } |
373 |
-+ return 1; |
374 |
- } |
375 |
- |
376 |
- |
377 |
-@@ -173,7 +175,7 @@ |
378 |
- |
379 |
- canonical_labeling = graph->g->canonical_form(s, hook, hook_user_param); |
380 |
- |
381 |
-- if(stats) |
382 |
-+ if(canonical_labeling && stats) |
383 |
- { |
384 |
- stats->group_size_approx = s.get_group_size_approx(); |
385 |
- stats->nof_nodes = s.get_nof_nodes(); |
386 |
-diff -Naur bliss-0.72.orig/bliss_C.h bliss-0.72/bliss_C.h |
387 |
---- bliss-0.72.orig/bliss_C.h 2013-04-28 14:35:20.582085167 -0600 |
388 |
-+++ bliss-0.72/bliss_C.h 2013-04-28 14:36:28.792330603 -0600 |
389 |
-@@ -156,6 +156,7 @@ |
390 |
- * The argument \a perm should be an array of |
391 |
- * N=bliss::bliss_get_nof_vertices(\a graph) elements describing |
392 |
- * a bijection on {0,...,N-1}. |
393 |
-+ * Returns NULL if insufficient memory or internal error. |
394 |
- */ |
395 |
- BlissGraph *bliss_permute(BlissGraph *graph, const unsigned int *perm); |
396 |
- |
397 |
-@@ -174,8 +175,9 @@ |
398 |
- * if you want to use the automorphism later, you have to take a copy of it. |
399 |
- * Do not call bliss_* functions in the hook. |
400 |
- * If \a stats is non-null, then some search statistics are copied there. |
401 |
-+ * \return nonzero if successful, zero if insufficient memory or internal error |
402 |
- */ |
403 |
--void |
404 |
-+int |
405 |
- bliss_find_automorphisms(BlissGraph *graph, |
406 |
- void (*hook)(void *user_param, |
407 |
- unsigned int N, |
408 |
-@@ -194,6 +196,7 @@ |
409 |
- * then bliss_permute() with the returned canonical labeling. |
410 |
- * Note that the computed canonical version may depend on the applied version |
411 |
- * of bliss. |
412 |
-+ * Returns NULL if insufficient memory or internal error. |
413 |
- */ |
414 |
- const unsigned int * |
415 |
- bliss_find_canonical_labeling(BlissGraph *graph, |
416 |
-diff -Naur bliss-0.72.orig/defs.cc bliss-0.72/defs.cc |
417 |
---- bliss-0.72.orig/defs.cc 2013-04-28 14:35:20.582085167 -0600 |
418 |
-+++ bliss-0.72/defs.cc 2013-04-28 14:36:28.792330603 -0600 |
419 |
-@@ -33,7 +33,6 @@ |
420 |
- vfprintf(stderr, fmt, ap); |
421 |
- fprintf(stderr, "\nAborting!\n"); |
422 |
- va_end(ap); |
423 |
-- exit(1); |
424 |
- } |
425 |
- |
426 |
- } |
427 |
-diff -Naur bliss-0.72.orig/graph.cc bliss-0.72/graph.cc |
428 |
---- bliss-0.72.orig/graph.cc 2013-04-28 14:35:20.582085167 -0600 |
429 |
-+++ bliss-0.72/graph.cc 2013-04-28 14:37:16.162501050 -0600 |
430 |
-@@ -34,7 +34,10 @@ |
431 |
- namespace bliss { |
432 |
- |
433 |
- #define _INTERNAL_ERROR() fatal_error("%s:%d: internal error",__FILE__,__LINE__) |
434 |
--#define _OUT_OF_MEMORY() fatal_error("%s:%d: out of memory",__FILE__,__LINE__) |
435 |
-+#define _OUT_OF_MEMORY(label) do { \ |
436 |
-+ fatal_error("%s:%d: out of memory",__FILE__,__LINE__); \ |
437 |
-+ goto label; \ |
438 |
-+ } while (0) |
439 |
- |
440 |
- /*------------------------------------------------------------------------- |
441 |
- * |
442 |
-@@ -279,20 +282,6 @@ |
443 |
- *perm = i; |
444 |
- } |
445 |
- |
446 |
--bool |
447 |
--AbstractGraph::is_automorphism(unsigned int* const perm) |
448 |
--{ |
449 |
-- _INTERNAL_ERROR(); |
450 |
-- return false; |
451 |
--} |
452 |
-- |
453 |
--bool |
454 |
--AbstractGraph::is_automorphism(const std::vector<unsigned int>& perm) const |
455 |
--{ |
456 |
-- _INTERNAL_ERROR(); |
457 |
-- return false; |
458 |
--} |
459 |
-- |
460 |
- |
461 |
- |
462 |
- |
463 |
-@@ -608,17 +597,7 @@ |
464 |
- }; |
465 |
- |
466 |
- |
467 |
-- |
468 |
-- |
469 |
--typedef struct { |
470 |
-- unsigned int splitting_element; |
471 |
-- unsigned int certificate_index; |
472 |
-- unsigned int subcertificate_length; |
473 |
-- UintSeqHash eqref_hash; |
474 |
--} PathInfo; |
475 |
-- |
476 |
-- |
477 |
--void |
478 |
-+bool |
479 |
- AbstractGraph::search(const bool canonical, Stats& stats) |
480 |
- { |
481 |
- const unsigned int N = get_nof_vertices(); |
482 |
-@@ -658,7 +637,7 @@ |
483 |
- if(N == 0) |
484 |
- { |
485 |
- /* Nothing to do, return... */ |
486 |
-- return; |
487 |
-+ return true; |
488 |
- } |
489 |
- |
490 |
- /* Initialize the partition ... */ |
491 |
-@@ -696,10 +675,10 @@ |
492 |
- */ |
493 |
- if(first_path_labeling) free(first_path_labeling); |
494 |
- first_path_labeling = (unsigned int*)calloc(N, sizeof(unsigned int)); |
495 |
-- if(!first_path_labeling) _OUT_OF_MEMORY(); |
496 |
-+ if(!first_path_labeling) _OUT_OF_MEMORY(oom1); |
497 |
- if(best_path_labeling) free(best_path_labeling); |
498 |
- best_path_labeling = (unsigned int*)calloc(N, sizeof(unsigned int)); |
499 |
-- if(!best_path_labeling) _OUT_OF_MEMORY(); |
500 |
-+ if(!best_path_labeling) _OUT_OF_MEMORY(oom2); |
501 |
- |
502 |
- /* |
503 |
- * Is the initial partition discrete? |
504 |
-@@ -710,7 +689,7 @@ |
505 |
- update_labeling(best_path_labeling); |
506 |
- /* Update statistics */ |
507 |
- stats.nof_leaf_nodes = 1; |
508 |
-- return; |
509 |
-+ return true; |
510 |
- } |
511 |
- |
512 |
- /* |
513 |
-@@ -718,20 +697,39 @@ |
514 |
- */ |
515 |
- if(first_path_labeling_inv) free(first_path_labeling_inv); |
516 |
- first_path_labeling_inv = (unsigned int*)calloc(N, sizeof(unsigned int)); |
517 |
-- if(!first_path_labeling_inv) _OUT_OF_MEMORY(); |
518 |
-+ if(!first_path_labeling_inv) _OUT_OF_MEMORY(oom3); |
519 |
- if(best_path_labeling_inv) free(best_path_labeling_inv); |
520 |
- best_path_labeling_inv = (unsigned int*)calloc(N, sizeof(unsigned int)); |
521 |
-- if(!best_path_labeling_inv) _OUT_OF_MEMORY(); |
522 |
-+ if(!best_path_labeling_inv) _OUT_OF_MEMORY(oom4); |
523 |
- |
524 |
- /* |
525 |
- * Allocate space for the automorphisms |
526 |
- */ |
527 |
- if(first_path_automorphism) free(first_path_automorphism); |
528 |
- first_path_automorphism = (unsigned int*)malloc(N * sizeof(unsigned int)); |
529 |
-- if(!first_path_automorphism) _OUT_OF_MEMORY(); |
530 |
-+ if(!first_path_automorphism) _OUT_OF_MEMORY(oom5); |
531 |
- if(best_path_automorphism) free(best_path_automorphism); |
532 |
- best_path_automorphism = (unsigned int*)malloc(N * sizeof(unsigned int)); |
533 |
-- if(!best_path_automorphism) _OUT_OF_MEMORY(); |
534 |
-+ if(!best_path_automorphism) { |
535 |
-+ _OUT_OF_MEMORY(oom6); |
536 |
-+ oom6: |
537 |
-+ free(first_path_automorphism); |
538 |
-+ first_path_automorphism = NULL; |
539 |
-+ oom5: |
540 |
-+ free(best_path_labeling_inv); |
541 |
-+ best_path_labeling_inv = NULL; |
542 |
-+ oom4: |
543 |
-+ free(first_path_labeling_inv); |
544 |
-+ first_path_labeling_inv = NULL; |
545 |
-+ oom3: |
546 |
-+ free(best_path_labeling); |
547 |
-+ best_path_labeling = NULL; |
548 |
-+ oom2: |
549 |
-+ free(first_path_labeling); |
550 |
-+ first_path_labeling = NULL; |
551 |
-+ oom1: |
552 |
-+ return false; |
553 |
-+ } |
554 |
- |
555 |
- /* |
556 |
- * Initialize orbit information so that all vertices are in their own orbits |
557 |
-@@ -745,7 +743,6 @@ |
558 |
- initialize_certificate(); |
559 |
- |
560 |
- std::vector<TreeNode> search_stack; |
561 |
-- std::vector<PathInfo> first_path_info; |
562 |
- std::vector<PathInfo> best_path_info; |
563 |
- |
564 |
- search_stack.clear(); |
565 |
-@@ -974,7 +971,6 @@ |
566 |
- */ |
567 |
- { |
568 |
- unsigned int next_split_element = UINT_MAX; |
569 |
-- unsigned int* next_split_element_pos = 0; |
570 |
- unsigned int* ep = p.elements + cell->first; |
571 |
- if(current_node.fp_on) |
572 |
- { |
573 |
-@@ -985,7 +981,6 @@ |
574 |
- *ep < next_split_element and |
575 |
- first_path_orbits.is_minimal_representative(*ep)) { |
576 |
- next_split_element = *ep; |
577 |
-- next_split_element_pos = ep; |
578 |
- } |
579 |
- } |
580 |
- } |
581 |
-@@ -1001,7 +996,6 @@ |
582 |
- current_node.long_prune_redundant.find(*ep) == |
583 |
- current_node.long_prune_redundant.end())) { |
584 |
- next_split_element = *ep; |
585 |
-- next_split_element_pos = ep; |
586 |
- } |
587 |
- } |
588 |
- } |
589 |
-@@ -1015,7 +1009,6 @@ |
590 |
- current_node.long_prune_redundant.find(*ep) == |
591 |
- current_node.long_prune_redundant.end())) { |
592 |
- next_split_element = *ep; |
593 |
-- next_split_element_pos = ep; |
594 |
- } |
595 |
- } |
596 |
- } |
597 |
-@@ -1203,8 +1196,10 @@ |
598 |
- |
599 |
- #if defined(BLISS_VERIFY_EQUITABLEDNESS) |
600 |
- /* The new partition should be equitable */ |
601 |
-- if(!is_equitable()) |
602 |
-+ if(!is_equitable()) { |
603 |
- fatal_error("consistency check failed - partition after refinement is not equitable"); |
604 |
-+ return false; |
605 |
-+ } |
606 |
- #endif |
607 |
- |
608 |
- /* |
609 |
-@@ -1366,6 +1361,7 @@ |
610 |
- goto handle_first_path_automorphism; |
611 |
- /* Should never get here because of CR:FP */ |
612 |
- _INTERNAL_ERROR(); |
613 |
-+ return false; |
614 |
- } |
615 |
- } |
616 |
- |
617 |
-@@ -1598,8 +1594,10 @@ |
618 |
- |
619 |
- #if defined(BLISS_VERIFY_AUTOMORPHISMS) |
620 |
- /* Verify that it really is an automorphism */ |
621 |
-- if(!is_automorphism(best_path_automorphism)) |
622 |
-+ if(!is_automorphism(best_path_automorphism)) { |
623 |
- fatal_error("Best path automorhism validation check failed"); |
624 |
-+ return false; |
625 |
-+ } |
626 |
- #endif |
627 |
- |
628 |
- unsigned int gca_level_with_first = 0; |
629 |
-@@ -1666,6 +1664,7 @@ |
630 |
- |
631 |
- |
632 |
- _INTERNAL_ERROR(); |
633 |
-+ return false; |
634 |
- |
635 |
- |
636 |
- handle_first_path_automorphism: |
637 |
-@@ -1701,8 +1700,10 @@ |
638 |
- |
639 |
- #if defined(BLISS_VERIFY_AUTOMORPHISMS) |
640 |
- /* Verify that it really is an automorphism */ |
641 |
-- if(!is_automorphism(first_path_automorphism)) |
642 |
-+ if(!is_automorphism(first_path_automorphism)) { |
643 |
- fatal_error("First path automorphism validation check failed"); |
644 |
-+ return false; |
645 |
-+ } |
646 |
- #endif |
647 |
- |
648 |
- if(opt_use_long_prune) |
649 |
-@@ -1749,12 +1750,13 @@ |
650 |
- /* Release component recursion data in partition */ |
651 |
- if(opt_use_comprec) |
652 |
- p.cr_free(); |
653 |
-+ return true; |
654 |
- } |
655 |
- |
656 |
- |
657 |
- |
658 |
- |
659 |
--void |
660 |
-+bool |
661 |
- AbstractGraph::find_automorphisms(Stats& stats, |
662 |
- void (*hook)(void *user_param, |
663 |
- unsigned int n, |
664 |
-@@ -1764,7 +1766,8 @@ |
665 |
- report_hook = hook; |
666 |
- report_user_param = user_param; |
667 |
- |
668 |
-- search(false, stats); |
669 |
-+ if (!search(false, stats)) |
670 |
-+ return false; |
671 |
- |
672 |
- if(first_path_labeling) |
673 |
- { |
674 |
-@@ -1776,6 +1779,7 @@ |
675 |
- free(best_path_labeling); |
676 |
- best_path_labeling = 0; |
677 |
- } |
678 |
-+ return true; |
679 |
- } |
680 |
- |
681 |
- |
682 |
-@@ -1790,7 +1794,8 @@ |
683 |
- report_hook = hook; |
684 |
- report_user_param = user_param; |
685 |
- |
686 |
-- search(true, stats); |
687 |
-+ if (!search(true, stats)) |
688 |
-+ return NULL; |
689 |
- |
690 |
- return best_path_labeling; |
691 |
- } |
692 |
-@@ -3480,15 +3485,17 @@ |
693 |
- * Check whether perm is an automorphism. |
694 |
- * Slow, mainly for debugging and validation purposes. |
695 |
- */ |
696 |
--bool |
697 |
-+int |
698 |
- Digraph::is_automorphism(unsigned int* const perm) |
699 |
- { |
700 |
- std::set<unsigned int, std::less<unsigned int> > edges1; |
701 |
- std::set<unsigned int, std::less<unsigned int> > edges2; |
702 |
- |
703 |
- #if defined(BLISS_CONSISTENCY_CHECKS) |
704 |
-- if(!is_permutation(get_nof_vertices(), perm)) |
705 |
-+ if(!is_permutation(get_nof_vertices(), perm)) { |
706 |
- _INTERNAL_ERROR(); |
707 |
-+ return -1; |
708 |
-+ } |
709 |
- #endif |
710 |
- |
711 |
- for(unsigned int i = 0; i < get_nof_vertices(); i++) |
712 |
-@@ -3507,7 +3514,7 @@ |
713 |
- ei++) |
714 |
- edges2.insert(*ei); |
715 |
- if(!(edges1 == edges2)) |
716 |
-- return false; |
717 |
-+ return 0; |
718 |
- |
719 |
- edges1.clear(); |
720 |
- for(std::vector<unsigned int>::iterator ei = v1.edges_out.begin(); |
721 |
-@@ -3520,10 +3527,10 @@ |
722 |
- ei++) |
723 |
- edges2.insert(*ei); |
724 |
- if(!(edges1 == edges2)) |
725 |
-- return false; |
726 |
-+ return 0; |
727 |
- } |
728 |
- |
729 |
-- return true; |
730 |
-+ return 1; |
731 |
- } |
732 |
- |
733 |
- bool |
734 |
-@@ -4330,8 +4337,10 @@ |
735 |
- Graph::permute(const unsigned int* perm) const |
736 |
- { |
737 |
- #if defined(BLISS_CONSISTENCY_CHECKS) |
738 |
-- if(!is_permutation(get_nof_vertices(), perm)) |
739 |
-+ if(!is_permutation(get_nof_vertices(), perm)) { |
740 |
- _INTERNAL_ERROR(); |
741 |
-+ return NULL; |
742 |
-+ } |
743 |
- #endif |
744 |
- |
745 |
- Graph* const g = new Graph(get_nof_vertices()); |
746 |
-@@ -5270,15 +5279,17 @@ |
747 |
- * |
748 |
- *-------------------------------------------------------------------------*/ |
749 |
- |
750 |
--bool |
751 |
-+int |
752 |
- Graph::is_automorphism(unsigned int* const perm) |
753 |
- { |
754 |
- std::set<unsigned int, std::less<unsigned int> > edges1; |
755 |
- std::set<unsigned int, std::less<unsigned int> > edges2; |
756 |
- |
757 |
- #if defined(BLISS_CONSISTENCY_CHECKS) |
758 |
-- if(!is_permutation(get_nof_vertices(), perm)) |
759 |
-+ if(!is_permutation(get_nof_vertices(), perm)) { |
760 |
- _INTERNAL_ERROR(); |
761 |
-+ return -1; |
762 |
-+ } |
763 |
- #endif |
764 |
- |
765 |
- for(unsigned int i = 0; i < get_nof_vertices(); i++) |
766 |
-@@ -5298,10 +5309,10 @@ |
767 |
- edges2.insert(*ei); |
768 |
- |
769 |
- if(!(edges1 == edges2)) |
770 |
-- return false; |
771 |
-+ return 0; |
772 |
- } |
773 |
- |
774 |
-- return true; |
775 |
-+ return 1; |
776 |
- } |
777 |
- |
778 |
- |
779 |
-@@ -5444,7 +5455,7 @@ |
780 |
- component.clear(); |
781 |
- component_elements = 0; |
782 |
- sh_return = 0; |
783 |
-- unsigned int sh_first = 0; |
784 |
-+ unsigned int sh_first = 1 << 31; |
785 |
- unsigned int sh_size = 0; |
786 |
- unsigned int sh_nuconn = 0; |
787 |
- |
788 |
-diff -Naur bliss-0.72.orig/graph.hh bliss-0.72/graph.hh |
789 |
---- bliss-0.72.orig/graph.hh 2013-04-28 14:35:20.582085167 -0600 |
790 |
-+++ bliss-0.72/graph.hh 2013-04-28 14:37:16.162501050 -0600 |
791 |
-@@ -109,9 +109,12 @@ |
792 |
- unsigned long int get_max_level() const {return max_level;} |
793 |
- }; |
794 |
- |
795 |
-- |
796 |
-- |
797 |
-- |
798 |
-+typedef struct { |
799 |
-+ unsigned int splitting_element; |
800 |
-+ unsigned int certificate_index; |
801 |
-+ unsigned int subcertificate_length; |
802 |
-+ UintSeqHash eqref_hash; |
803 |
-+} PathInfo; |
804 |
- |
805 |
- |
806 |
- /** |
807 |
-@@ -270,7 +273,7 @@ |
808 |
- void reset_permutation(unsigned int *perm); |
809 |
- |
810 |
- /* Mainly for debugging purposes */ |
811 |
-- virtual bool is_automorphism(unsigned int* const perm); |
812 |
-+ virtual int is_automorphism(unsigned int* const perm) = 0; |
813 |
- |
814 |
- std::vector<unsigned int> certificate_current_path; |
815 |
- std::vector<unsigned int> certificate_first_path; |
816 |
-@@ -284,7 +287,11 @@ |
817 |
- virtual Partition::Cell* find_next_cell_to_be_splitted(Partition::Cell *cell) = 0; |
818 |
- |
819 |
- |
820 |
-- void search(const bool canonical, Stats &stats); |
821 |
-+ /** |
822 |
-+ * \return true if successful, false if insufficient memory to complete or |
823 |
-+ * other internal error |
824 |
-+ */ |
825 |
-+ bool search(const bool canonical, Stats &stats); |
826 |
- |
827 |
- |
828 |
- void (*report_hook)(void *user_param, |
829 |
-@@ -351,7 +358,7 @@ |
830 |
- */ |
831 |
- unsigned int cr_component_elements; |
832 |
- |
833 |
-- |
834 |
-+ std::vector<PathInfo> first_path_info; |
835 |
- |
836 |
- |
837 |
- public: |
838 |
-@@ -362,7 +369,7 @@ |
839 |
- * Check whether \a perm is an automorphism of this graph. |
840 |
- * Unoptimized, mainly for debugging purposes. |
841 |
- */ |
842 |
-- virtual bool is_automorphism(const std::vector<unsigned int>& perm) const; |
843 |
-+ virtual bool is_automorphism(const std::vector<unsigned int>& perm) const = 0; |
844 |
- |
845 |
- |
846 |
- |
847 |
-@@ -427,8 +434,10 @@ |
848 |
- * if you want to use the automorphism later, you have to take a copy of it. |
849 |
- * Do not call any member functions in the hook. |
850 |
- * The search statistics are copied in \a stats. |
851 |
-+ * \return true if successful, false if insufficient memory to search or |
852 |
-+ * other internal error. |
853 |
- */ |
854 |
-- void find_automorphisms(Stats& stats, |
855 |
-+ bool find_automorphisms(Stats& stats, |
856 |
- void (*hook)(void* user_param, |
857 |
- unsigned int n, |
858 |
- const unsigned int* aut), |
859 |
-@@ -448,6 +457,8 @@ |
860 |
- * Note that the computed canonical version may depend on the applied version |
861 |
- * of bliss as well as on some other options (for instance, the splitting |
862 |
- * heuristic selected with bliss::Graph::set_splitting_heuristic()). |
863 |
-+ * This function returns NULL if there is insufficient memory, or another |
864 |
-+ * internal error occurs. |
865 |
- */ |
866 |
- const unsigned int* canonical_form(Stats& stats, |
867 |
- void (*hook)(void* user_param, |
868 |
-@@ -500,6 +511,10 @@ |
869 |
- opt_use_long_prune = active; |
870 |
- } |
871 |
- |
872 |
-+ /** |
873 |
-+ * Get an information vector about the first path. |
874 |
-+ */ |
875 |
-+ std::vector<PathInfo> get_first_path_info() { return first_path_info; } |
876 |
- }; |
877 |
- |
878 |
- |
879 |
-@@ -615,7 +630,7 @@ |
880 |
- |
881 |
- void initialize_certificate(); |
882 |
- |
883 |
-- bool is_automorphism(unsigned int* const perm); |
884 |
-+ int is_automorphism(unsigned int* const perm); |
885 |
- |
886 |
- |
887 |
- bool nucr_find_first_component(const unsigned int level); |
888 |
-@@ -856,7 +871,7 @@ |
889 |
- |
890 |
- void initialize_certificate(); |
891 |
- |
892 |
-- bool is_automorphism(unsigned int* const perm); |
893 |
-+ int is_automorphism(unsigned int* const perm); |
894 |
- |
895 |
- void sort_edges(); |
896 |
- |