21#ifndef _libint2_src_bin_libint_drtree_h_
22#define _libint2_src_bin_libint_drtree_h_
31class DRTree :
public std::enable_shared_from_this<DRTree> {
37 const std::shared_ptr<DGVertex>& v);
41 unsigned int nvertices()
const {
return nvertices_; }
43 const std::shared_ptr<DGVertex>&
root()
const;
47 void add_vertex(
const std::shared_ptr<DGVertex>& v);
49 void detach_from(
const std::shared_ptr<DGVertex>& v);
57 unsigned int nvertices_;
58 std::shared_ptr<DGVertex> root_;
This is a directed rooted tree.
Definition drtree.h:31
void detach_from(const std::shared_ptr< DGVertex > &v)
recurively detach v from this
Definition drtree.cc:77
const std::shared_ptr< DGVertex > & root() const
the root of the tree
Definition drtree.cc:48
void detach()
remove all references from vertices to the tree and vice versa
Definition drtree.cc:75
unsigned int nvertices() const
number of vertices
Definition drtree.h:41
static std::shared_ptr< DRTree > CreateRootedAt(const std::shared_ptr< DGVertex > &v)
If v is not on a DRTree, make a new one using v as root.
Definition drtree.cc:28
void add_vertex(const std::shared_ptr< DGVertex > &v)
will try to add v to this subtree. Should not be used by the user
Definition drtree.cc:50
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24