예제 #1
0
 def addAccFeat(self, acc, index, value):
     if index == 0:
         cpp.setInt(acc, index, value // self.balanceCutoff, True, False,
                    False)  #convert to ETH and pass to C++
     elif index == 1:
         cpp.setInt(acc, index, value, True, False, False)
     else:  #our indices should only be 0 or 2
         raise NotImplementedError
예제 #2
0
 def subAccFeat(self, acc, index, value):
     if index == 0:
         cpp.setInt(acc, index, value // self.balanceCutoff, False, True,
                    False)  #convert to ETH and pass to C++
     else:  #TODO this is an impossible case, but still implement it
         raise NotImplementedError
예제 #3
0
 def setAccFeat(self, acc, index, value):
     if index == 0:
         value = value // self.balanceCutoff
     cpp.setInt(acc, index, value, False, False, False)