add assignement operator to ConstraintTree
This commit is contained in:
parent
d07ea73050
commit
b6df8a66b1
@ -187,9 +187,7 @@ ConstraintTree::ConstraintTree (
|
|||||||
|
|
||||||
ConstraintTree::ConstraintTree (const ConstraintTree& ct)
|
ConstraintTree::ConstraintTree (const ConstraintTree& ct)
|
||||||
{
|
{
|
||||||
root_ = CTNode::copySubtree (ct.root_);
|
*this = ct;
|
||||||
logVars_ = ct.logVars_;
|
|
||||||
logVarSet_ = ct.logVarSet_;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -875,6 +873,19 @@ ConstraintTree::copyLogVar (LogVar X_1, LogVar X_2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ConstraintTree&
|
||||||
|
ConstraintTree::operator= (const ConstraintTree& ct)
|
||||||
|
{
|
||||||
|
if (this != &ct) {
|
||||||
|
root_ = CTNode::copySubtree (ct.root_);
|
||||||
|
logVars_ = ct.logVars_;
|
||||||
|
logVarSet_ = ct.logVarSet_;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
ConstraintTree::countTuples (const CTNode* n) const
|
ConstraintTree::countTuples (const CTNode* n) const
|
||||||
{
|
{
|
||||||
|
@ -200,6 +200,8 @@ class ConstraintTree
|
|||||||
|
|
||||||
void copyLogVar (LogVar,LogVar);
|
void copyLogVar (LogVar,LogVar);
|
||||||
|
|
||||||
|
ConstraintTree& operator= (const ConstraintTree& ct);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned countTuples (const CTNode*) const;
|
unsigned countTuples (const CTNode*) const;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user