Class Context¶
Defined in File context.hpp
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class Context¶
Specifies details of the MBPT formalism.
MBPT context contains:
csv: whether to use cluster-specific virtuals
an
OpRegistry: maps operator labels to theirOpClass
Can be accessed via
get_default_mbpt_context(). Functions access this global context to validate operator types and properties.Warning
Default construction creates a
Contextwith nullOpRegistry. Most MBPT functions require a registry. Can be initialized as:set_default_mbpt_context(Context({.op_registry_ptr = make_minimal_registry()}));
Public Functions
-
Context(Options options = make_default_options())¶
Construct a Context object, uses default options if none are given.
-
~Context() = default¶
destructor
-
Context clone() const¶
clones this object and its OpRegistry
-
std::shared_ptr<const OpRegistry> op_registry() const¶
Note
asserts that OpRegistry is not null
- Returns:
a constant pointer to the OpRegistry for this context
-
std::shared_ptr<OpRegistry> mutable_op_registry() const¶
Note
asserts that OpRegistry is not null
- Returns:
a pointer to the OpRegistry for this context
-
Context &set(const OpRegistry &op_registry)¶
sets the OpRegistry for this context
sets the OpRegistry for this context
Public Static Functions
-
static inline Options make_default_options()¶
makes default options for mbpt::Context
-
struct Defaults¶
-
struct Options¶
Public Members
-
std::shared_ptr<OpRegistry> op_registry_ptr = nullptr¶
shared pointer to operator registry
-
std::optional<OpRegistry> op_registry = std::nullopt¶
optional operator registry, use if no shared pointer is provided
-
std::shared_ptr<OpRegistry> op_registry_ptr = nullptr¶