forpy 2

Public Member Functions | Public Attributes | List of all members
forpy::TreeDesk Struct Reference
Desk Implementations

Desk for tree training. More...

`#include <desk.h>`

## Public Member Functions
void | setup (std::atomic< size_t > *silp, std::atomic< id_t > *np, std::vector< std::pair< id_t, id_t >> *tsp)
| Set up all the internal pointers. More...
void | reset ()
| Clear the marks and reset all pointers. More...

## Public Attributes
std::vector< TodoMark > | marks
std::atomic< size_t > * | stored_in_leafs
std::atomic< id_t > * | next_id_p
std::vector< std::pair< id_t, id_t > > * | tree_p

## Detailed Description

Desk for tree training.

Storage container for threaded tree training (see also Desk Implementations).

Definition at line 19 of file desk.h.

## Member Function Documentation

## ◆ reset()

void forpy::TreeDesk::reset | ( |  | ) |
| inline

Clear the marks and reset all pointers.

Definition at line 45 of file desk.h.

## ◆ setup()

void forpy::TreeDesk::setup | ( | std::atomic< size_t > * | silp,
|  | std::atomic< id_t > * | np,
|  | std::vector< std::pair< id_t, id_t >> * | tsp
| ) |  |
| inline

Set up all the internal pointers.

Definition at line 36 of file desk.h.

## Member Data Documentation

## ◆ marks

std::vector<TodoMark> forpy::TreeDesk::marks

Storing marked nodes for DFS. (`std::stack` has no `clear()` method, that's why I gave preference to an `std::vector`.)

Definition at line 22 of file desk.h.

## ◆ next_id_p

std::atomic<id_t>* forpy::TreeDesk::next_id_p

To determine the ID of the next tree node to use. Usually points to forpy::Tree::next_id (see the doc there for the storage concept).

Definition at line 28 of file desk.h.

## ◆ stored_in_leafs

std::atomic<size_t>* forpy::TreeDesk::stored_in_leafs

Tracking how many samples have been stored (mainly as sanity check). Usually points to forpy::Tree::stored_in_leafs.

Definition at line 25 of file desk.h.

## ◆ tree_p

std::vector<std::pair<id_t, id_t> >* forpy::TreeDesk::tree_p

A vector representation of the tree. Usually points to forpy::Tree::tree.

Definition at line 31 of file desk.h.

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

- /Users/classner/git/forpy/include/forpy/util/desk.h