PolyFEM
Loading...
Searching...
No Matches
polyfem::utils::Tree Class Reference

#include <Jacobian.hpp>

Public Member Functions

 Tree ()
 
 Tree (const Tree &T)
 
Tree operator= (const Tree &T)
 
bool merge (const Tree &T, int max_depth=2)
 
bool has_children () const
 
int n_children () const
 
int depth () const
 
int n_leaves () const
 
Treechild (int i)
 
const Treechild (int i) const
 
void add_children (int n)
 

Private Attributes

std::vector< std::unique_ptr< Tree > > children
 

Friends

std::ostream & operator<< (std::ostream &ost, const Tree &T)
 

Detailed Description

Definition at line 7 of file Jacobian.hpp.

Constructor & Destructor Documentation

◆ Tree() [1/2]

polyfem::utils::Tree::Tree ( )
inline

Definition at line 10 of file Jacobian.hpp.

◆ Tree() [2/2]

polyfem::utils::Tree::Tree ( const Tree T)
inline

Definition at line 11 of file Jacobian.hpp.

References children.

Member Function Documentation

◆ add_children()

void polyfem::utils::Tree::add_children ( int  n)
inline

Definition at line 79 of file Jacobian.hpp.

References children.

Referenced by merge().

Here is the caller graph for this function:

◆ child() [1/2]

Tree & polyfem::utils::Tree::child ( int  i)
inline

Definition at line 77 of file Jacobian.hpp.

References children.

Referenced by depth(), merge(), and n_leaves().

Here is the caller graph for this function:

◆ child() [2/2]

const Tree & polyfem::utils::Tree::child ( int  i) const
inline

Definition at line 78 of file Jacobian.hpp.

References children.

◆ depth()

int polyfem::utils::Tree::depth ( ) const
inline

Definition at line 61 of file Jacobian.hpp.

References child(), depth(), has_children(), and n_children().

Referenced by depth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_children()

bool polyfem::utils::Tree::has_children ( ) const
inline

Definition at line 59 of file Jacobian.hpp.

References children.

Referenced by depth(), merge(), n_leaves(), and operator=().

Here is the caller graph for this function:

◆ merge()

bool polyfem::utils::Tree::merge ( const Tree T,
int  max_depth = 2 
)
inline

Definition at line 30 of file Jacobian.hpp.

References add_children(), child(), has_children(), merge(), and n_children().

Referenced by merge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ n_children()

int polyfem::utils::Tree::n_children ( ) const
inline

Definition at line 60 of file Jacobian.hpp.

References children.

Referenced by depth(), merge(), and n_leaves().

Here is the caller graph for this function:

◆ n_leaves()

int polyfem::utils::Tree::n_leaves ( ) const
inline

Definition at line 69 of file Jacobian.hpp.

References child(), has_children(), n_children(), and n_leaves().

Referenced by n_leaves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

Tree polyfem::utils::Tree::operator= ( const Tree T)
inline

Definition at line 18 of file Jacobian.hpp.

References children, and has_children().

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  ost,
const Tree T 
)
friend

Definition at line 46 of file Jacobian.hpp.

Member Data Documentation

◆ children

std::vector<std::unique_ptr<Tree> > polyfem::utils::Tree::children
private

Definition at line 85 of file Jacobian.hpp.

Referenced by add_children(), child(), child(), has_children(), n_children(), operator=(), and Tree().


The documentation for this class was generated from the following file: