Factor: improve factor multiplication
Pass the argument as reference-to-const and also allow chaining of multiplications.
This commit is contained in:
@@ -91,14 +91,16 @@ Factor::sumOutAllExceptIndex (size_t idx)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Factor::multiply (Factor& g)
|
||||
|
||||
Factor&
|
||||
Factor::multiply (const Factor& g)
|
||||
{
|
||||
if (args_.empty()) {
|
||||
*this = g;
|
||||
operator= (g);
|
||||
} else {
|
||||
GenericFactor<VarId>::multiply (g);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user