Esempio n. 1
0
 def expansion(self, niters=-1):
     """Do alpha-expansion for specified number of iterations.
     Return total energy after the expansion moves.
     If niters is set to -1, the algorithm will run until convergence."""
     _cgco.gcoExpansion(self.handle, np.intc(niters),
                        self.energy_temp_array)
     return self._convert_energy_back(self.energy_temp_array[0])
Esempio n. 2
0
 def expansion(self, niters=-1):
     """Do alpha-expansion for specified number of iterations. 
     Return total energy after the expansion moves.
     If niters is set to -1, the algorithm will run until convergence."""
     _cgco.gcoExpansion(self.handle, np.intc(niters), self.energyTempArray)
     return self._convertEnergyBack(self.energyTempArray[0])