#include <StableSetBranchRule.hh>
Public Member Functions | |
StableSetBranchRule (ABA_MASTER *master, int node, vector< int > *nodes) | |
virtual | ~StableSetBranchRule () |
virtual int | extract (ABA_SUB *sub) |
Definition at line 40 of file StableSetBranchRule.hh.
|
Constructor.
Definition at line 30 of file StableSetBranchRule.cpp. 00031 : 00032 ABA_BRANCHRULE(master), 00033 master_(master), 00034 setToOne(node) 00035 { 00036 00037 setToZeroSize = nodes->size(); 00038 00039 if (setToZeroSize > 0) { 00040 setToZero = new int[setToZeroSize]; 00041 for (int i=0; i<setToZeroSize; i++) { 00042 setToZero[i] = (*nodes)[i]; 00043 } 00044 } 00045 }
|
|
Destructor. Definition at line 51 of file StableSetBranchRule.cpp.
|
|
Activate this branching node.
Definition at line 65 of file StableSetBranchRule.cpp. 00065 { 00066 00067 int i, j; 00068 int size; 00069 00070 ((StableSetSub *)sub)->setVertex(setToOne, true); 00071 00072 00073 for (i=0; i<setToZeroSize; i++) { 00074 // Check for contradictions. 00075 if(sub->variable(setToZero[i])->fsVarStat()->set()) { 00076 return 1; 00077 } 00078 ((StableSetSub *)sub)->setVertex(setToZero[i], false); 00079 } 00080 00081 return 0; 00082 }
|