20 #ifndef _libint2_src_bin_libint_drtree_h_ 21 #define _libint2_src_bin_libint_drtree_h_ 23 #include <smart_ptr.h> 31 public EnableSafePtrFromThis<DRTree>
41 unsigned int nvertices()
const {
return nvertices_; }
43 const SafePtr<DGVertex>&
root()
const;
53 DRTree(
const SafePtr<DGVertex>& root);
57 unsigned int nvertices_;
58 SafePtr<DGVertex> root_;
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
unsigned int nvertices() const
number of vertices
Definition: drtree.h:41
void detach()
remove all references from vertices to the tree and vice versa
Definition: drtree.cc:88
static SafePtr< DRTree > CreateRootedAt(const SafePtr< 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 SafePtr< DGVertex > &v)
will try to add v to this subtree. Should not be used by the user
Definition: drtree.cc:64
void detach_from(const SafePtr< DGVertex > &v)
recurively detach v from this
Definition: drtree.cc:94
const SafePtr< DGVertex > & root() const
the root of the tree
Definition: drtree.cc:58
This is a directed rooted tree.
Definition: drtree.h:30