# net::tree
树,每个节点包含一个值 More...
#include <tree.hpp>
# Public Types
Name | |
---|---|
using Data | DataType |
# Public Functions
Name | |
---|---|
tree() =default | |
tree(const Data & D) | |
tree(const Data & D, std::shared_ptr< tree< Data > > Tree1, std::shared_ptr< tree< Data > > Tree2) | |
tree(const tree< Data > & ) =default | |
~tree() =default | |
std::string | gviz() const 将树转化为dot脚本用于作图 |
# Public Attributes
Name | |
---|---|
Data | val |
std::shared_ptr< tree< Data > > | left_child |
std::shared_ptr< tree< Data > > | right_child |
# Detailed Description
template <typename Data >
struct net::tree;
树,每个节点包含一个值
# Public Types Documentation
# using DataType
using net::tree< Data >::DataType = Data;
# Public Functions Documentation
# function tree
tree() =default
# function tree
inline tree(
const Data & D
)
# function tree
inline tree(
const Data & D,
std::shared_ptr< tree< Data > > Tree1,
std::shared_ptr< tree< Data > > Tree2
)
# function tree
tree(
const tree< Data > &
) =default
# function ~tree
~tree() =default
# function gviz
std::string gviz() const
将树转化为dot脚本用于作图
# Public Attributes Documentation
# variable val
Data val;
# variable left_child
std::shared_ptr< tree< Data > > left_child;
# variable right_child
std::shared_ptr< tree< Data > > right_child;
Updated on 15 June 2022 at 16:04:19 CST