148 lines
4.0 KiB
Diff
148 lines
4.0 KiB
Diff
diff -u bliss-0.73.orig/graph.cc bliss-0.73/graph.cc
|
|
--- bliss-0.73.orig/graph.cc 2015-09-01 09:23:10.000000000 +0200
|
|
+++ bliss-0.73/graph.cc 2020-07-03 10:11:29.480649776 +0200
|
|
@@ -67,6 +67,9 @@
|
|
|
|
report_hook = 0;
|
|
report_user_param = 0;
|
|
+
|
|
+ limit_search_nodes = 0;
|
|
+ limit_generators = 0;
|
|
}
|
|
|
|
|
|
@@ -609,13 +612,7 @@
|
|
|
|
|
|
|
|
-
|
|
-typedef struct {
|
|
- unsigned int splitting_element;
|
|
- unsigned int certificate_index;
|
|
- unsigned int subcertificate_length;
|
|
- UintSeqHash eqref_hash;
|
|
-} PathInfo;
|
|
+// struct PathInfo moved to graph.hh by Thomas Rehn, 2011-07-12
|
|
|
|
|
|
void
|
|
@@ -745,7 +742,7 @@
|
|
initialize_certificate();
|
|
|
|
std::vector<TreeNode> search_stack;
|
|
- std::vector<PathInfo> first_path_info;
|
|
+ // first_path_info moved to graph.hh by Thomas Rehn, 2011-07-12
|
|
std::vector<PathInfo> best_path_info;
|
|
|
|
search_stack.clear();
|
|
@@ -1054,6 +1051,8 @@
|
|
const unsigned int child_level = current_level+1;
|
|
/* Update some statistics */
|
|
stats.nof_nodes++;
|
|
+ if (limit_search_nodes && stats.nof_nodes >= limit_search_nodes)
|
|
+ break;
|
|
if(search_stack.size() > stats.max_level)
|
|
stats.max_level = search_stack.size();
|
|
|
|
@@ -1642,6 +1641,8 @@
|
|
best_path_automorphism);
|
|
/* Update statistics */
|
|
stats.nof_generators++;
|
|
+ if (limit_generators && stats.nof_generators >= limit_generators)
|
|
+ break;
|
|
}
|
|
|
|
/*
|
|
@@ -1733,6 +1734,8 @@
|
|
|
|
/* Update statistics */
|
|
stats.nof_generators++;
|
|
+ if (limit_generators && stats.nof_generators >= limit_generators)
|
|
+ break;
|
|
continue;
|
|
|
|
} /* while(!search_stack.empty()) */
|
|
@@ -5452,7 +5455,7 @@
|
|
component.clear();
|
|
component_elements = 0;
|
|
sh_return = 0;
|
|
- unsigned int sh_first = 0;
|
|
+ unsigned int sh_first = 1 << 31;
|
|
unsigned int sh_size = 0;
|
|
unsigned int sh_nuconn = 0;
|
|
|
|
Seulement dans bliss-0.73: graph.cc.orig
|
|
diff -u bliss-0.73.orig/graph.hh bliss-0.73/graph.hh
|
|
--- bliss-0.73.orig/graph.hh 2015-09-01 09:23:10.000000000 +0200
|
|
+++ bliss-0.73/graph.hh 2020-07-03 10:11:29.484649847 +0200
|
|
@@ -20,6 +20,9 @@
|
|
along with bliss. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
+/** This is a patched version of bliss by Thomas Rehn extended by method AbstractGraph::set_search_limits() */
|
|
+#define BLISS_PATCH_PRESENT
|
|
+
|
|
/**
|
|
* \namespace bliss
|
|
* The namespace bliss contains all the classes and functions of the bliss
|
|
@@ -111,6 +114,14 @@
|
|
|
|
|
|
|
|
+/** moved here from graph.cc by Thomas Rehn, 2011-07-12 */
|
|
+typedef struct {
|
|
+ unsigned int splitting_element;
|
|
+ unsigned int certificate_index;
|
|
+ unsigned int subcertificate_length;
|
|
+ UintSeqHash eqref_hash;
|
|
+} PathInfo;
|
|
+
|
|
|
|
|
|
|
|
@@ -284,7 +295,20 @@
|
|
opt_use_long_prune = active;
|
|
}
|
|
|
|
+ /// information vector about first path
|
|
+ /** added by Thomas Rehn, 2011-07-12 */
|
|
+ std::vector<PathInfo> get_first_path_info() { return first_path_info; }
|
|
|
|
+ /// limits number of search nodes and generators during the backtrack search
|
|
+ /** added by Thomas Rehn, 2012-01-12
|
|
+ *
|
|
+ * \param searchNodeLimit if non-zero, limits the number of search nodes in search tree
|
|
+ * \param generatorLimit if non-zero, limits the maximal number of automorphism group generators to be found
|
|
+ */
|
|
+ void set_search_limits(const unsigned int searchNodeLimit, const unsigned int generatorLimit) {
|
|
+ limit_search_nodes = searchNodeLimit;
|
|
+ limit_generators = generatorLimit;
|
|
+ }
|
|
|
|
protected:
|
|
/** \internal
|
|
@@ -519,6 +543,11 @@
|
|
|
|
|
|
|
|
+ /** added by Thomas Rehn, 2011-07-12 */
|
|
+ std::vector<PathInfo> first_path_info;
|
|
+
|
|
+ unsigned int limit_search_nodes;
|
|
+ unsigned int limit_generators;
|
|
};
|
|
|
|
|
|
diff -u bliss-0.73.orig/Makefile bliss-0.73/Makefile
|
|
--- bliss-0.73.orig/Makefile 2015-09-01 09:23:10.000000000 +0200
|
|
+++ bliss-0.73/Makefile 2020-07-03 10:11:29.484649847 +0200
|
|
@@ -5,7 +5,7 @@
|
|
CFLAGS += --pedantic
|
|
CFLAGS += -O9
|
|
#CFLAGS += -DBLISS_DEBUG
|
|
-CFLAGS += -fPIC
|
|
+CFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden
|
|
|
|
SRCS = defs.cc graph.cc partition.cc orbit.cc uintseqhash.cc heap.cc
|
|
SRCS += timer.cc utils.cc bliss_C.cc
|