 +namespace qpbo{
  
  template <typename REAL>
-    void QPBO<REAL>::ComputeWeakPersistencies()
+ 	void QPBO<REAL>::ComputeWeakPersistencies()
 @@ -167,5 +169,5 @@ template <typename REAL>
  
-    ComputeWeakPersistencies();
+ 	ComputeWeakPersistencies();
  }
 -
 +}}
  #include "instances.inc"
-diff -rupN QPBO-v1.3.src/block.h QPBO-v1.3.src-patched/block.h
---- QPBO-v1.3.src/block.h   2010-01-25 10:39:21.000000000 -0500
-+++ QPBO-v1.3.src-patched/block.h   2016-07-25 14:35:33.253091828 -0400
-@@ -87,8 +87,8 @@
-    deallocated only when the destructor is called.
- */
- 
--#ifndef __BLOCK_H__
--#define __BLOCK_H__
-+#ifndef __QPBO_BLOCK_H__
-+#define __QPBO_BLOCK_H__
- 
- #include <stdlib.h>
- 
-@@ -96,6 +96,9 @@
- /***********************************************************************/
- /***********************************************************************/
- 
-+namespace kolmogorov{
-+namespace qpbo{
-+
- template <class Type> class Block
- {
- public:
-@@ -121,7 +124,7 @@ public:
-            else
-            {
-                block *next = (block *) new char [sizeof(block) + (block_size-1)*sizeof(Type)];
--               if (!next) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
-+               if (!next) { if (error_function) (*error_function)((char*)("Not enough memory!")); exit(1); }
-                if (last) last -> next = next;
-                else first = next;
-                last = next;
-@@ -220,7 +223,7 @@ public:
-        {
-            block *next = first;
-            first = (block *) new char [sizeof(block) + (block_size-1)*sizeof(block_item)];
--           if (!first) { if (error_function) (*error_function)("Not enough memory!"); exit(1); }
-+           if (!first) { if (error_function) (*error_function)((char*)("Not enough memory!")); exit(1); }
-            first_free = & (first -> data[0] );
-            for (item=first_free; item<first_free+block_size-1; item++)
-                item -> next_free = item + 1;
-@@ -263,6 +266,8 @@ private:
-    void    (*error_function)(char *);
- };
- 
-+} //namespace qpbo
-+} // namespace kolmogorov
- 
- #endif
- 
-diff -rupN QPBO-v1.3.src/instances.inc QPBO-v1.3.src-patched/instances.inc
---- QPBO-v1.3.src/instances.inc 2010-01-25 10:38:59.000000000 -0500
-+++ QPBO-v1.3.src-patched/instances.inc 2016-07-25 14:35:33.253091828 -0400
-@@ -5,30 +5,32 @@
- #endif
- 
- // Instantiations
--
--template class QPBO<int>;
--template class QPBO<float>;
--template class QPBO<double>;
-+namespace kolmogorov{
-+namespace qpbo{
- 
- template <> 
-    inline void QPBO<int>::get_type_information(char*& type_name, char*& type_format)
- {
--   type_name = "int";
--   type_format = "d";
-+   type_name = (char*)("int");
-+   type_format = (char*)("d");
- }
- 
- template <> 
-    inline void QPBO<float>::get_type_information(char*& type_name, char*& type_format)
- {
--   type_name = "float";
--   type_format = "f";
-+   type_name = (char*)("float");
-+   type_format = (char*)("f");
- }
- 
- template <> 
-    inline void QPBO<double>::get_type_information(char*& type_name, char*& type_format)
- {
--   type_name = "double";
--   type_format = "Lf";
-+   type_name = (char*)("double");
-+   type_format = (char*)("Lf");
- }
- 
-+template class QPBO<int>;
-+template class QPBO<float>;
-+template class QPBO<double>;
- 
-+}}

+namespace kolmogorov{
+namespace qpbo{
 
 #define INFINITE_D ((int)(((unsigned)-1)/2))       /* infinite distance to the terminal */
 
@@ -704,5 +705,5 @@ template <typename REAL>
        }
    }
 }
-
+}}
 #include "instances.inc"
diff -rupN QPBO-v1.3.src/QPBO_postprocessing.cpp QPBO-v1.3.src-patched/QPBO_postprocessing.cpp
--- QPBO-v1.3.src/QPBO_postprocessing.cpp   2010-01-25 10:38:59.000000000 -0500
+++ QPBO-v1.3.src-patched/QPBO_postprocessing.cpp   2016-07-25 14:35:33.253091828 -0400
@@ -4,8 +4,10 @@
 #include <stdio.h>
 #include <stdlib.h>

+namespace qpbo{
 
 template <typename REAL>
 	void QPBO<REAL>::ComputeRandomPermutation(int N, int* permutation)
@@ -1109,7 +1111,6 @@ template <typename REAL>
 	user_terminated = false;
 
 	memcpy(&probe_options, &options, sizeof(ProbeOptions));
-
 	is_enough_memory = Probe(mapping);
 
 	while ( 1 )
@@ -1230,5 +1231,5 @@ template <typename REAL>
 	delete [] permutation;
 	return success;
 }
-
+}}
 #include "instances.inc"
diff -rupNw QPBO-v1.3.src/QPBO.h QPBO-v1.3.src-patched/QPBO.h
--- QPBO-v1.3.src/QPBO.h	2010-01-25 10:41:14.000000000 -0500
+++ QPBO-v1.3.src-patched/QPBO.h	2017-09-06 15:02:16.638704004 -0400
@@ -1,12 +1,10 @@
 /* QBPO.h */
 /*
 	Version 1.3
-
     Copyright 2006-2008 Vladimir Kolmogorov (vnk@adastral.ucl.ac.uk).
     This software can be used for research purposes only.
 	This software or its derivatives must not be publicly distributed
 	without a prior consent from the author (Vladimir Kolmogorov).
-
     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -38,7 +36,7 @@
 
 		P. L. Hammer, P. Hansen, and B. Simeone. 
 		Roof duality, complementation and persistency in quadratic 0-1 optimization. 
-		Mathematical Programming, 28:121155, 1984.
+       Mathematical Programming, 28:121�155, 1984.
 
 		E. Boros, P. L. Hammer, and X. Sun.
 		Network flows and minimization of quadratic pseudo-Boolean functions. 
@@ -120,7 +118,8 @@
 // #define user_assert(ignore)((void) 0) 
 // #define code_assert(ignore)((void) 0) 
