Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
canonical.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//canonical.hpp is free software: you can redistribute it and/or modify
4//it under the terms of the GNU General Public License as published by
5//the Free Software Foundation, either version 3 of the License, or
6//(at your option) any later version.
7//
8//canonical.hpp is distributed in the hope that it will be useful,
9//but WITHOUT ANY WARRANTY; without even the implied warranty of
10//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11//GNU General Public License for more details.
12//
13//You should have received a copy of the GNU General Public License
14//along with canonical.hpp. If not, see <http://www.gnu.org/licenses/>.
15//
16// Copyright(C) Bertini2 Development Team
17//
18// See <http://www.gnu.org/licenses/> for a copy of the license,
19// as well as COPYING. Bertini2 is provided with permitted
20// additional terms in the b2/licenses/ directory.
21
47
48#pragma once
49
50#include <vector>
51#include <memory>
52
54
55namespace bertini {
56namespace node {
57
62
68
74
82
95void CanonicalizeNaryOperands(std::vector<std::shared_ptr<Node>>& operands,
96 std::vector<bool>& flags,
97 bool multiplicands_first);
98
99} // namespace node
100} // namespace bertini
Definition canonical.hpp:56
MonomialOrder
Pluggable monomial orders for canonicalization.
Definition canonical.hpp:61
@ RevLex
Definition canonical.hpp:61
@ Lex
Definition canonical.hpp:61
@ GrevLex
Definition canonical.hpp:61
void CanonicalizeNaryOperands(std::vector< std::shared_ptr< Node > > &operands, std::vector< bool > &flags, bool multiplicands_first)
Sort an n-ary operator's (operand, flag) pairs into canonical order, in place.
bool PowerFoldByDefault()
Whether Mult construction flattens + power-folds (x*x -> x^2) by default.
bool CanonicalizeByDefault()
Whether Sum/Mult construction canonicalizes operand order by default.
void SetMonomialOrder(MonomialOrder order)
Set the session-wide monomial order (determines interned identity).
void SetCanonicalizeByDefault(bool on)
Set whether Sum/Mult construction canonicalizes operand order by default.
MonomialOrder CurrentMonomialOrder()
The monomial order currently used for canonicalization (session-global – it must be consistent sessio...
void SetPowerFoldByDefault(bool on)
Set whether Mult construction flattens + power-folds by default.
Definition algorithm_builder.hpp:36
Defines the abstract Node base class.