3 #include "../settings.h"
14 template<
typename Settings>
36 for (std::size_t level = 1; level <= projection.mProjection.dim(); ++level) {
37 sum += projection.mProjection.size(level);
38 for (std::size_t pid = 0; pid < projection.mProjection.size(level); ++pid) {
39 if (projection.mProjection.hasPolynomialById(level, pid)) {
40 const auto& p = projection.mProjection.getPolynomialById(level, pid);
52 template<
typename Settings>
55 std::vector<Poly> polys;
56 for (
const auto& c: constraints) {
57 polys.emplace_back(c.lhs());
61 for (
const auto& c: constraints) {
90 std::set<ConstraintT> constraints;
92 carl::visit(f, [&](
const FormulaT& f){
93 if (f.type() == carl::FormulaType::CONSTRAINT) {
94 constraints.insert(f.constraint());
100 perform_projection<SettingsCollins>(
"cad_projection_collins", constraints, stats);
103 perform_projection<SettingsHong>(
"cad_projection_hong", constraints, stats);
106 perform_projection<SettingsMcCallum>(
"cad_projection_mccallum", constraints, stats);
109 perform_projection<SettingsMcCallumPartial>(
"cad_projection_mccallum_partial", constraints, stats);
112 perform_projection<SettingsLazard>(
"cad_projection_lazard", constraints, stats);
115 perform_projection<SettingsBrown>(
"cad_projection_brown", constraints, stats);
std::size_t add(const ConstraintT &c)
void reset(const std::vector< carl::Variable > &vars)
void analyze_cad_projections(const FormulaT &f, AnalyzerStatistics &stats)
void perform_projection(const std::string &prefix, const std::set< ConstraintT > &constraints, AnalyzerStatistics &stats)
void collect_projection_size(const std::string &prefix, const P &projection, AnalyzerStatistics &stats)
Poly normalize(const Poly &p)
Normalizes the given Poly by removing constant and duplicate factors.
std::vector< carl::Variable > triangular_ordering(const std::vector< Poly > &polys)
carl::UnivariatePolynomial< Poly > UPoly
std::vector< T > prefix(const std::vector< T > vars, std::size_t prefixSize)
carl::Formula< Poly > FormulaT
carl::Constraint< Poly > ConstraintT
const auto & settings_analyzer()
void add(const std::string &key, const T &value)
void add(const ConstraintT &c)
cad::CADConstraints< Settings::backtracking > mConstraints
cad::ProjectionT< Settings > mProjection
static constexpr cad::ProjectionType projectionOperator
static constexpr cad::ProjectionType projectionOperator
static constexpr cad::ProjectionType projectionOperator
static constexpr cad::ProjectionType projectionOperator
static constexpr cad::ProjectionType projectionOperator
static constexpr cad::ProjectionType projectionOperator