Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
Loading...
Searching...
No Matches
data_structures::Node Struct Reference
Collaboration diagram for data_structures::Node:
[legend]

Public Member Functions

 Node (int key, int level, void *value=nullptr)
 

Public Attributes

int key
 key integer
 
void * value
 pointer of value
 
std::vector< std::shared_ptr< Node > > forward
 nodes of the given one in all levels
 

Detailed Description

Node structure [Key][Node*, Node*...]

Constructor & Destructor Documentation

◆ Node()

data_structures::Node::Node ( int key,
int level,
void * value = nullptr )
inline

Creates node with provided key, level and value

Parameters
keyis number that is used for comparision
levelis the maximum level node's going to added
44 : key(key), value(value) {
45 // Initialization of forward vector
46 for (int i = 0; i < (level + 1); i++) {
47 forward.push_back(nullptr);
48 }
49 }
T push_back(T... args)
void * value
pointer of value
Definition skip_list.cpp:35
int key
key integer
Definition skip_list.cpp:34
std::vector< std::shared_ptr< Node > > forward
nodes of the given one in all levels
Definition skip_list.cpp:37
Here is the call graph for this function:

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