 +namespace qpbo{
  
  template <typename REAL>
-    void QPBO<REAL>::ComputeRandomPermutation(int N, int* permutation)
-@@ -1109,10 +1111,9 @@ template <typename REAL>
-    user_terminated = false;
- 
-    memcpy(&probe_options, &options, sizeof(ProbeOptions));
-+       is_enough_memory = Probe(mapping);
- 
--   is_enough_memory = Probe(mapping);
--
--   while ( 1 )
-+       while ( 1 )
-    {
-        if (user_terminated) break;
- 
-@@ -1145,7 +1146,7 @@ template <typename REAL>
-        is_enough_memory = Probe(mapping1);
-        MergeMappings(nodeNum0, mapping, mapping1);
-        delete [] mapping1;
--   }
-+   } 
- }
- 
- 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;
+ 	delete [] permutation;
+ 	return success;
  }
 -
 +}}
  #include "instances.inc"
-diff -rupN 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    2016-07-25 14:35:33.253091828 -0400
-@@ -1,13 +1,11 @@
+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).
-+   Copyright 2006-2008 Vladimir Kolmogorov (vnk@adastral.ucl.ac.uk).
+ 	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
-+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ 	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
-     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 @@ -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.
+ 		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. 
+ 		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) 

 // REAL: can be int, float, double.
 // Current instantiations are in instances.inc
@@ -263,7 +262,7 @@ public:
    //
    //         A. Billionnet and B. Jaumard. 
    //         A decomposition method for minimizing quadratic pseudoboolean functions. 
-   //         Operation Research Letters, 8:161163, 1989. 
+   //         Operation Research Letters, 8:161�163, 1989.   
    //
    //     For a review see also 
    //
@@ -811,5 +810,5 @@ template <typename REAL>
 */
 #define QPBO_MAXFLOW_TERMINAL ( (Arc *) 1 )        /* to terminal */
 #define QPBO_MAXFLOW_ORPHAN   ( (Arc *) 2 )        /* orphan */
-
+}}
 #endif
diff -rupN QPBO-v1.3.src/QPBO_maxflow.cpp QPBO-v1.3.src-patched/QPBO_maxflow.cpp
--- QPBO-v1.3.src/QPBO_maxflow.cpp  2010-01-25 10:38:59.000000000 -0500
+++ QPBO-v1.3.src-patched/QPBO_maxflow.cpp  2016-07-25 14:35:33.253091828 -0400
@@ -2,9 +2,10 @@
 
 

+namespace qpbo{
 
 template <typename REAL>
 	void QPBO<REAL>::ComputeWeakPersistencies()
@@ -167,5 +169,5 @@ template <typename REAL>
 
 	ComputeWeakPersistencies();
 }
-
+}}
 #include "instances.inc"
