const Variable::set LinearCombination::getUsedVariables() const { Variable::set retSet; for(const LinearTerm& lt : linearTerms_) { retSet.insert(lt.variable()); } return retSet; }
Variable::set ConstraintSystem::getUsedVariables() const { Variable::set retSet; for(auto& pConstraint : constraintsPtrs_) { const Variable::set curSet = pConstraint->getUsedVariables(); retSet.insert(curSet.begin(), curSet.end()); } return retSet; }
const Variable::set Polynomial::getUsedVariables() const { Variable::set retset; for(const Monomial& monomial : monomials_) { const Variable::set curSet = monomial.getUsedVariables(); retset.insert(curSet.begin(), curSet.end()); } return retset; }
const Variable::set PolynomialConstraint::getUsedVariables() const { Variable::set retSet; const Variable::set aSet = a_.getUsedVariables(); retSet.insert(aSet.begin(), aSet.end()); const Variable::set bSet = b_.getUsedVariables(); retSet.insert(bSet.begin(), bSet.end()); return retSet; }
const Variable::set Rank1Constraint::getUsedVariables() const { Variable::set retSet; const Variable::set aSet = a_.getUsedVariables(); retSet.insert(aSet.begin(), aSet.end()); const Variable::set bSet = b_.getUsedVariables(); retSet.insert(bSet.begin(), bSet.end()); const Variable::set cSet = c_.getUsedVariables(); retSet.insert(cSet.begin(), cSet.end()); return retSet; }