21 #ifndef _libint2_src_bin_libint_drtree_h_ 22 #define _libint2_src_bin_libint_drtree_h_ 24 #include <smart_ptr.h> 32 public EnableSafePtrFromThis<DRTree>
42 unsigned int nvertices()
const {
return nvertices_; }
44 const SafePtr<DGVertex>&
root()
const;
58 unsigned int nvertices_;
59 SafePtr<DGVertex> root_;
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24
const SafePtr< DGVertex > & root() const
the root of the tree
Definition: drtree.cc:59
unsigned int nvertices() const
number of vertices
Definition: drtree.h:42
void detach()
remove all references from vertices to the tree and vice versa
Definition: drtree.cc:89
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:29
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:65
void detach_from(const SafePtr< DGVertex > &v)
recurively detach v from this
Definition: drtree.cc:95
This is a directed rooted tree.
Definition: drtree.h:31