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

  key | is number that is used for comparision
  level | is the maximum level node's going to added

: key(key), value(value) {
// Initialization of forward vector
for (int i = 0; i < (level + 1); i++) {
forward.push_back(nullptr);
}
}
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
Here is the call graph for this function:

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

- data_structures/skip_list.cpp