Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
node.hpp File Reference

Defines the abstract Node base class. More...

#include <iostream>
#include <string>
#include <map>
#include <tuple>
#include <optional>
#include <typeinfo>
#include <boost/type_index.hpp>
#include "bertini2/num_traits.hpp"
#include "bertini2/detail/visitable.hpp"
#include "bertini2/function_tree/forward_declares.hpp"
#include "bertini2/function_tree/print_dialect.hpp"
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/export.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/tracking.hpp>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/nvp.hpp>
Include dependency graph for node.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bertini::node::Node
 An interface for all nodes in a function tree, and for a function object as well. More...

Namespaces

namespace  bertini
namespace  bertini::node

Typedefs

using bertini::VariableGroup = std::vector< std::shared_ptr<node::Variable> >
 An ordered group of variables (the unit of homogenization / variable grouping).
using bertini::SubstitutionMap = std::map< std::string, std::shared_ptr<node::Node> >
 A substitution request for Node::Subs: variable name -> the node to put in its place.

Enumerations

enum class  bertini::VariableGroupType { bertini::Homogeneous , bertini::Affine , bertini::Ungrouped }
 How a variable group participates in homogenization. More...
enum  bertini::node::PrintPrecedence : unsigned {
  bertini::node::PrecSum = 10 , bertini::node::PrecNegate = 15 , bertini::node::PrecMult = 20 , bertini::node::PrecPower = 30 ,
  bertini::node::PrecAtom = 100
}
 Operator precedence classes, used to decide parenthesization when printing. More...

Functions

std::ostream & bertini::node::operator<< (std::ostream &out, const Node &N)
 a single layer of indirection, though which to call the overridden virtual print() method which must be defined for each non-abstract Node type.
std::ostream & bertini::node::operator<< (std::ostream &out, const std::shared_ptr< Node > &N)
 Stream insertion for a Node pointer: dispatches to the node's virtual print().
std::string bertini::node::PrintIn (Node const &N, PrintDialect dialect)
 Print a tree in one dialect (see print_dialect.hpp).
std::string bertini::node::PrintClassic (Node const &N)
 The Bertini 1 spelling of a tree: ^ for powers, (re+im*I) for complex constants, every constant with all its digits.
std::string bertini::node::PrintPython (Node const &N, bool exact)
 The Python spelling of a tree: ** for powers.
std::shared_ptr< Node > bertini::node::Intern (std::shared_ptr< Node > const &candidate)
 Hash-cons a freshly-built node: return an existing structurally-equal node if one is live, otherwise register and return this one.

Detailed Description

Defines the abstract Node base class.