コード例 #1
0
 def alpha_beta_swap(self, l1, l2):
     """Do a single alpha-beta swap for specified pair of labels."""
     if not (0 <= l1 < self.nb_labels) or not (0 <= l2 < self.nb_labels):
         raise IndexOutOfBoundError()
     _cgco.gcoAlphaBetaSwap(self.handle, np.intc(l1), np.intc(l2))
コード例 #2
0
ファイル: pygco.py プロジェクト: jgera/Segmentation-Code
 def alphaBetaSwap(self, l1, l2):
     """Do a single alpha-beta swap for specified pair of labels."""
     if not (0 <= l1 < self.numLabels) or not (0 <= l2 < self.numLabels):
         raise IndexOutOfBoundError()
     _cgco.gcoAlphaBetaSwap(self.handle, np.intc(l1), np.intc(l2))