TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
Loading...
Searching...
No Matches
Node< ValueType > Class Template Reference

#include <node.hpp>

Collaboration diagram for Node< ValueType >:
[legend]

Public Types

using value_type = ValueType
 

Public Member Functions

 Node (int v, Node *n)
 

Public Attributes

int data
 
int next
 
ValueType data = {}
 
std::shared_ptr< Node< ValueType > > next = {}
 
int val
 
Nodenext
 

Detailed Description

template<class ValueType>
class Node< ValueType >

for std::cout for std::shared_ptr for std::vector Definition of the node as a linked-list

Template Parameters
ValueTypetype of data nodes of the linked list should contain

Definition at line 14 of file linkedlist_implentation_usingarray.cpp.

Member Typedef Documentation

◆ value_type

template<class ValueType >
using Node< ValueType >::value_type = ValueType

Definition at line 17 of file node.hpp.

Constructor & Destructor Documentation

◆ Node()

template<class ValueType >
Node< ValueType >::Node ( int v,
Node< ValueType > * n )
inline

Definition at line 8 of file get_size_of_linked_list.cpp.

8: val(v), next(n) {} // Default constructor for Node

Member Data Documentation

◆ data [1/2]

template<class ValueType >
int Node< ValueType >::data

Definition at line 15 of file linkedlist_implentation_usingarray.cpp.

◆ data [2/2]

template<class ValueType >
ValueType Node< ValueType >::data = {}

Definition at line 18 of file node.hpp.

18{};

◆ next [1/3]

template<class ValueType >
int Node< ValueType >::next

Definition at line 16 of file linkedlist_implentation_usingarray.cpp.

◆ next [2/3]

template<class ValueType >
std::shared_ptr<Node<ValueType> > Node< ValueType >::next = {}

Definition at line 19 of file node.hpp.

19{};

◆ next [3/3]

template<class ValueType >
Node* Node< ValueType >::next

Definition at line 6 of file get_size_of_linked_list.cpp.

◆ val

template<class ValueType >
int Node< ValueType >::val

Definition at line 5 of file get_size_of_linked_list.cpp.


The documentation for this class was generated from the following files: