Algorithms_in_C++  1.0.0
Set of algorithms implemented in C++.
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  }
Here is the call graph for this function:

The documentation for this struct was generated from the following file:
std::vector::push_back
T push_back(T... args)
data_structures::Node::value
void * value
pointer of value
Definition: skip_list.cpp:35
data_structures::Node::key
int key
key integer
Definition: skip_list.cpp:34
data_structures::Node::forward
std::vector< std::shared_ptr< Node > > forward
nodes of the given one in all levels
Definition: skip_list.cpp:37