/freebsd/contrib/kyua/utils/config/ |
H A D | tree_test.cpp | 29 #include "utils/config/tree.ipp" 47 /// constructors to validate that we can use it as a leaf of a tree. 70 /// Custom tree leaf type for an object without defualt constructors. 134 config::tree tree; in ATF_TEST_CASE_BODY() local 136 tree.define< config::int_node >("var1"); in ATF_TEST_CASE_BODY() 137 tree.define< config::string_node >("var2"); in ATF_TEST_CASE_BODY() 138 tree.define< config::bool_node >("var3"); in ATF_TEST_CASE_BODY() 140 tree.set< config::int_node >("var1", 42); in ATF_TEST_CASE_BODY() 141 tree.set< config::string_node >("var2", "hello"); in ATF_TEST_CASE_BODY() 142 tree.set< config::bool_node >("var3", false); in ATF_TEST_CASE_BODY() [all …]
|
H A D | lua_module_test.cpp | 37 #include "utils/config/tree.ipp" 125 config::tree tree; in ATF_TEST_CASE_BODY() local 126 tree.define< config::bool_node >("top_boolean"); in ATF_TEST_CASE_BODY() 127 tree.define< config::int_node >("top_integer"); in ATF_TEST_CASE_BODY() 128 tree.define< config::string_node >("top_string"); in ATF_TEST_CASE_BODY() 132 config::redirect(state, tree); in ATF_TEST_CASE_BODY() 140 ATF_REQUIRE_EQ(true, tree.lookup< config::bool_node >("top_boolean")); in ATF_TEST_CASE_BODY() 141 ATF_REQUIRE_EQ(12345, tree.lookup< config::int_node >("top_integer")); in ATF_TEST_CASE_BODY() 142 ATF_REQUIRE_EQ("a foo", tree.lookup< config::string_node >("top_string")); in ATF_TEST_CASE_BODY() 149 config::tree tree; in ATF_TEST_CASE_BODY() local [all …]
|
H A D | parser_test.cpp | 37 #include "utils/config/tree.ipp" 50 /// Initializes the tree keys before reading the file. 52 /// \param [in,out] tree The tree in which to define the key structure. 56 setup(config::tree& tree, const int syntax_version) in setup() argument 61 tree.define< config::string_node >("top_string"); in setup() 62 tree.define< config::int_node >("inner.int"); in setup() 63 tree.define_dynamic("inner.dynamic"); in setup() 73 /// \param tree The mock config tree to parse. 74 mock_parser(config::tree& tree) : in mock_parser() argument 75 config::parser(tree) in mock_parser() [all …]
|
H A D | tree.cpp | 29 #include "utils/config/tree.ipp" 42 config::tree::tree(const bool strict) : in tree() function in config::tree 51 /// \param root The root to the tree to be owned by this instance. 52 config::tree::tree(const bool strict, detail::static_inner_node* root) : in tree() function in config::tree 59 config::tree::~tree(void) in ~tree() 64 /// Generates a deep copy of the input tree. 66 /// \return A new tree that is an exact copy of this tree. 67 config::tree 68 config::tree::deep_copy(void) const in deep_copy() 72 return config::tree(_strict, new_root); in deep_copy() [all …]
|
/freebsd/contrib/unbound/edns-subnet/ |
H A D | addrtree.c | 2 * edns-subnet/addrtree.c -- radix tree for edns subnet cache. 36 * addrtree -- radix tree for edns subnet cache. 83 * @param tree: Tree the node lives in. 90 node_create(struct addrtree *tree, void *elem, addrlen_t scope, in node_create() argument 97 tree->node_count++; in node_create() 110 * @param tree: tree the node lives in 115 node_size(const struct addrtree *tree, const struct addrnode *n) in node_size() argument 118 (n->elem?tree->sizefunc(n->elem):0); in node_size() 125 struct addrtree *tree; in addrtree_create() local 128 tree = (struct addrtree *)calloc(1, sizeof(*tree)); in addrtree_create() [all …]
|
/freebsd/contrib/unbound/util/storage/ |
H A D | dnstree.h | 48 * Tree of domain names. Sorted first by class then by name. 52 * The tree itself is a rbtree_type. 58 /** parent in tree */ 71 * Tree of IP addresses. Sorted first by protocol, then by bits. 74 * The tree itself is a rbtree_type. 80 /** parent in tree */ 91 * Init a name tree to be empty 92 * @param tree: to init. 94 void name_tree_init(rbtree_type* tree); 97 * insert element into name tree. [all …]
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | btree.c | 32 * Intensity 1: Verify that the tree's height is consistent throughout. 35 * Intensity 3: Verify that the total number of elements in the tree matches the 87 zfs_btree_poison_node(zfs_btree_t *tree, zfs_btree_hdr_t *hdr) in zfs_btree_poison_node() argument 90 size_t size = tree->bt_elem_size; in zfs_btree_poison_node() 105 tree->bt_leaf_size - offsetof(zfs_btree_leaf_t, btl_elems) - in zfs_btree_poison_node() 112 zfs_btree_poison_node_at(zfs_btree_t *tree, zfs_btree_hdr_t *hdr, in zfs_btree_poison_node_at() argument 116 size_t size = tree->bt_elem_size; in zfs_btree_poison_node_at() 128 ASSERT3U(idx, <=, tree->bt_leaf_cap); in zfs_btree_poison_node_at() 129 ASSERT3U(idx + count, <=, tree->bt_leaf_cap); in zfs_btree_poison_node_at() 138 zfs_btree_verify_poison_at(zfs_btree_t *tree, zfs_btree_hdr_t *hdr, in zfs_btree_verify_poison_at() argument [all …]
|
/freebsd/contrib/ldns/ldns/ |
H A D | radix.h | 2 * radix.h -- generic radix tree 39 * Radix tree. Implementation taken from NSD 4, adjusted for use in ldns. 67 /** A node in a radix tree */ 89 /** An entire radix tree */ 93 /** Number of nodes in tree. */ 98 * Create a new radix tree. 99 * @return: new radix tree. 105 * Initialize radix tree. 106 * @param tree: uninitialized radix tree. 109 void ldns_radix_init(ldns_radix_t* tree); [all …]
|
H A D | rbtree.h | 2 * rbtree.h -- generic red-black tree 39 * Red black tree. Implementation taken from NSD 3.0.5, adjusted for use 80 /** An entire red black tree */ 82 /** definition for tree struct */ 84 /** The root of the red-black tree */ 87 /** The number of the nodes in the tree */ 98 * Create new tree (malloced) with given key compare function. 100 * @return: new tree, empty. 105 * Free the complete tree (but not its keys) 106 * @param rbtree The tree to free [all …]
|
/freebsd/share/man/man3/ |
H A D | tree.3 | 1 .\" $OpenBSD: tree.3,v 1.7 2002/06/12 01:09:20 provos Exp $ 230 has to be a unique name prefix for every tree that is defined. 244 A splay tree is a self-organizing data structure. 245 Every operation on the tree causes a splay to happen. 247 node to the root of the tree and partly rebalances it. 250 the requested nodes move to the top of the tree. 257 inserts on an initially empty tree as 262 accesses to a splay tree is 265 A splay tree is headed by a structure defined by the 279 is the type of the elements to be inserted into the tree. [all …]
|
H A D | Makefile | 34 tree.3 326 MLINKS+= tree.3 RB_AUGMENT.3 \ 327 tree.3 RB_AUGMENT_CHECK.3 \ 328 tree.3 RB_EMPTY.3 \ 329 tree.3 RB_ENTRY.3 \ 330 tree.3 RB_FIND.3 \ 331 tree.3 RB_FOREACH.3 \ 332 tree.3 RB_FOREACH_FROM.3 \ 333 tree.3 RB_FOREACH_REVERSE.3 \ 334 tree.3 RB_FOREACH_REVERSE_FROM.3 \ [all …]
|
H A D | arb.3 | 1 .\" $OpenBSD: tree.3,v 1.7 2002/06/12 01:09:20 provos Exp $ 187 e.g., when the tree needs to be transferred between userspace and kernel. 203 has to be a unique name prefix for every tree that is defined. 215 A red-black tree is a binary search tree with the node color as an 228 Every operation on a red-black tree is bounded as 230 The maximum height of a red-black tree is 238 tree entries is therefore constrained by the minimum of array size and choice of 244 A red-black tree is headed by a structure defined by the 258 is the type of the elements to be inserted into the tree. 267 creates a red-black tree head structure with 8-bit signed array indices capable [all …]
|
/freebsd/sys/contrib/openzfs/include/sys/ |
H A D | avl.h | 53 * AVL tree implementation uses 3 pointers. The following chart gives the 56 * Operation Link List AVL tree 79 * 1. Create the list/tree with: avl_create() 94 * 2d. Remove individual nodes from the list/tree with avl_remove(). 102 * 4. Use avl_destroy() to destroy the AVL tree itself. 117 * Type used for the root of the AVL tree. 122 * The data nodes in the AVL tree must have a field of this type. 127 * An opaque type used to locate a position in the tree where a node 155 * Initialize an AVL tree. Arguments are: 157 * tree - the tree to be initialized [all …]
|
H A D | btree.h | 29 * This file defines the interface for a B-Tree implementation for ZFS. The 30 * tree can be used to store arbitrary sortable data types with low overhead 31 * and good operation performance. In addition the tree intelligently 34 * Note that for all B-Tree functions, the values returned are pointers to the 35 * internal copies of the data in the tree. The internal data can only be 37 * with respect to any other elements in the tree. 39 * The major drawback of the B-Tree is that any returned elements or indexes 44 * The B-Tree has two types of nodes: core nodes, and leaf nodes. Core 48 * layer of the tree. Unlike B+ Trees, in this B-Tree implementation the 50 * elements. Each element occurs only once in the tree, no matter what kind [all …]
|
/freebsd/sys/cddl/contrib/opensolaris/uts/common/sys/ |
H A D | avl.h | 53 * AVL tree implementation uses 3 pointers. The following chart gives the 56 * Operation Link List AVL tree 79 * 1. Create the list/tree with: avl_create() 94 * 2d. Remove individual nodes from the list/tree with avl_remove(). 102 * 4. Use avl_destroy() to destroy the AVL tree itself. 125 * Type used for the root of the AVL tree. 130 * The data nodes in the AVL tree must have a field of this type. 135 * An opaque type used to locate a position in the tree where a node 163 * Initialize an AVL tree. Arguments are: 165 * tree - the tree to be initialized [all …]
|
/freebsd/sys/contrib/openzfs/module/avl/ |
H A D | avl.c | 32 * AVL - generic AVL tree implementation for kernel use 36 * Here is a very brief overview. An AVL tree is a binary search tree that is 41 * This relaxation from a perfectly balanced binary tree allows doing 42 * insertion and deletion relatively efficiently. Searching the tree is 45 * The key to insertion and deletion is a set of tree manipulations called 63 * there is no recursion stack present to move "up" in the tree, 85 * allows using half as much code (and hence cache footprint) for tree 89 * adjacent to where a new value would be inserted in the tree. The value 129 avl_walk(avl_tree_t *tree, void *oldnode, int left) in avl_walk() argument 131 size_t off = tree->avl_offset; in avl_walk() [all …]
|
/freebsd/crypto/openssl/crypto/x509/ |
H A D | pcy_tree.c | 18 * If the maximum number of nodes in the policy tree isn't defined, set it to 21 * Defining this to be zero means unlimited policy tree growth which opens the 54 char *str, X509_POLICY_TREE *tree, in tree_print() argument 60 curr = tree->levels + tree->nlevel; in tree_print() 66 (long)(curr - tree->levels)); in tree_print() 67 for (plev = tree->levels; plev != curr; plev++) { in tree_print() 71 (long)(plev - tree->levels), plev->flags); in tree_print() 85 #define TREE_PRINT(str, tree, curr) \ argument 87 tree_print(trc_out, "before tree_prune()", tree, curr); \ 93 * X509_PCY_TREE_VALID: valid tree [all …]
|
/freebsd/contrib/kyua/engine/ |
H A D | config.cpp | 41 #include "utils/config/tree.ipp" 56 /// Defines the schema of a configuration tree. 58 /// \param [in,out] tree The tree to populate. The tree should be empty on 61 init_tree(config::tree& tree) in init_tree() argument 63 tree.define< config::string_node >("architecture"); in init_tree() 64 tree.define< config::strings_set_node >("execenvs"); in init_tree() 65 tree.define< config::positive_int_node >("parallelism"); in init_tree() 66 tree.define< config::string_node >("platform"); in init_tree() 67 tree.define< engine::user_node >("unprivileged_user"); in init_tree() 68 tree.define_dynamic("test_suites"); in init_tree() [all …]
|
/freebsd/usr.sbin/etcupdate/ |
H A D | etcupdate.8 | 116 the source tree, 131 The default mode merges changes from the source tree to the destination 154 tree already exists, 155 then that tree is saved as the 157 tree. 160 tree is removed if it exists. 163 tree is built from a source tree. 168 then the tree is extracted from that tarball instead. 179 tree, 184 tree, [all …]
|
/freebsd/contrib/unbound/util/ |
H A D | rbtree.h | 2 * rbtree.h -- generic red-black tree 39 * Red black tree. Implementation taken from NSD 3.0.5, adjusted for use 73 /** An entire red black tree */ 75 /** definition for tree struct */ 77 /** The root of the red-black tree */ 80 /** The number of the nodes in the tree */ 91 * Create new tree (malloced) with given key compare function. 93 * @return: new tree, empty. 98 * Init a new tree (malloced by caller) with given key compare function. 99 * @param rbtree: uninitialised memory for new tree, returned empty. [all …]
|
/freebsd/contrib/ncurses/ncurses/base/ |
H A D | tries.c | 37 ** Functions to manage the tree of partial-completions for keycodes. 51 _nc_expand_try(TRIES * tree, unsigned code, int *count, size_t len) in NCURSES_EXPORT() 53 TRIES *ptr = tree; in NCURSES_EXPORT() 88 * Remove a code from the specified tree, freeing the unused nodes. Returns 92 _nc_remove_key(TRIES ** tree, unsigned code) in _nc_remove_key() argument 94 T((T_CALLED("_nc_remove_key(%p,%d)"), (void *) tree, code)); in _nc_remove_key() 99 while (*tree != 0) { in _nc_remove_key() 100 if (_nc_remove_key(&(*tree)->child, code)) { in _nc_remove_key() 103 if ((*tree)->value == code) { in _nc_remove_key() 104 if ((*tree)->child) { in _nc_remove_key() [all …]
|
/freebsd/usr.sbin/etcupdate/tests/ |
H A D | ignore_test.sh | 76 mkdir -p $i/tree 79 # tree: Test three different cases (add, modify, remove) that all 80 # match the tree/* glob. 81 echo "foo" > $NEW/tree/add 83 echo "old" > $i/tree/modify 85 echo "new" > $NEW/tree/modify 87 echo "old" > $i/tree/remove 90 # rmdir: Remove a whole tree. 193 D /tree/remove 195 U /tree/modify [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | SuffixTree.h | 1 //===- llvm/ADT/SuffixTree.h - Tree for substrings --------------*- C++ -*-===// 11 // A suffix tree is a type of compressed trie structure where each node 13 // of the tree is a suffix. 15 // A suffix tree can be seen as a type of state machine where each state is a 16 // substring of the full string. The tree is structured so that, for a string 17 // of length N, there are exactly N leaves in the tree. This structure allows 21 // These integers may result from hashing some data type. A suffix tree can 24 // The suffix tree is implemented using Ukkonen's algorithm for linear-time 25 // suffix tree construction. Ukkonen's algorithm is explained in more detail 48 /// A repeated substring in the tree. [all …]
|
/freebsd/contrib/ofed/opensm/include/opensm/ |
H A D | osm_mtree.h | 9 * COPYING in the main directory of this source tree, or the 39 * This object represents multicast spanning tree. 61 /****h* OpenSM/Multicast Tree 63 * Multicast Tree 66 * The Multicast Tree object encapsulates the information needed by the 67 * OpenSM to manage multicast fabric routes. It is a tree structure 68 * in which each node in the tree represents a switch, and may have a 73 * The Multicast Tree is not thread safe, thus callers must provide 83 /****s* OpenSM: Multicast Tree/osm_mtree_node_t 89 * OpenSM for a particular switch in the multicast tree. [all …]
|
/freebsd/usr.bin/dtc/ |
H A D | dtc.1 | 36 .Nd device tree compiler 58 utility converts between flattened device tree (FDT) representations. 59 It is most commonly used to generate device tree blobs (DTB), the binary 60 representation of an FDT, from device tree sources (DTS), the ASCII text source 71 with the device tree blob compiled in. 114 Device tree blob. 117 Device tree source. 127 Assembler source for generating a device tree blob, as described in 130 Device tree blob. 134 Device tree source. [all …]
|