Skip to content

Commit 8196a27

Browse files
committed
pass classifier test
1 parent cd4a641 commit 8196a27

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/pygcgopt/detprobdata.pxi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,14 @@ cdef class DetProbData:
252252
cdef ConsPartition* result = self.thisptr.getConsPartition(partitionIndex)
253253
return ConsPart.create(result, <DetProbData>weakref.proxy(self))
254254

255-
#def getConsPartitions(self):
255+
def getConsPartitions(self):
256256
"""returns list to stored constraint partitions
257257
258258
:return: list to stored constraint partitions
259259
:rtype: list
260260
"""
261-
# cdef vector[ConsPartition*] result = self.thisptr.getConsPartitions()
262-
# return [ConsPart.create(r, self) for r in result]
261+
cdef nconsparts = self.thisptr.getNConsPartitions()
262+
return [ConsPart.create(self.thisptr.getConsPartition(r), self) for r in range(nconsparts)]
263263

264264
def getCons(self, consIndex):
265265
"""returns constraint related to a constraint index

src/pygcgopt/gcg.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ cdef extern from "gcg/class_detprobdata.h" namespace "gcg":
371371
void freeTemporaryData() except +
372372
PARTIALDECOMP* getAncestorPartialdec(int partialdecindex) except +
373373
ConsPartition* getConsPartition(int partitionIndex) except +
374-
#vector[ConsPartition*] getConsPartitions() except +
375374
SCIP_CONS* getCons(int consIndex) except +
376375
vector[int] getConssForCons(int consIndex) except +
377376
vector[int] getConssForVar(int varIndex) except +

0 commit comments

Comments
 (0)