Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/C-Plus-Plus
/ functions
Functions
2,100 in github.com/TheAlgorithms/C-Plus-Plus
⨍
Functions
2,100
◇
Types & classes
164
↓ 1 callers
Function
update_weights
* Update weights of the SOM using Kohonen algorithm * * \param[in] X data point * \param[in,out] W weights matrix * \param[in,out] D temporary vec
machine_learning/kohonen_som_trace.cpp:103
↓ 1 callers
Method
v_stack
divide_and_conquer/strassen_matrix_multiplication.cpp:153
↓ 1 callers
Method
variance
return data variance computed till last sample */
math/realtime_stats.cpp:89
↓ 1 callers
Function
vector_mag
numerical_methods/qr_decompose.h:92
↓ 1 callers
Function
vector_proj
numerical_methods/qr_decompose.h:104
↓ 1 callers
Function
zeroes_initialization
machine_learning/vector_ops.hpp:213
Method
AyStarSearch
* @brief Parameterized constructor for AyStarSearch * @param initial denoting initial state of the puzzle * @param final denoting final stat
machine_learning/a_star_search.cpp:394
Method
BinarySearch
indicator whether list is sorted or not * @brief Search an element in the list using binarySearch. * @param dataArr list * @param first poin
data_structures/list_array.cpp:49
Method
BinaryTree
operations_on_datastructures/reverse_binary_tree.cpp:94
Method
Bitset
* @brief BitSet class constructor * @param initSize amount of blocks, each contain sizeof(std::size_t) bits */
data_structures/bloom_filter.cpp:63
Method
BloomFilter
data_structures/bloom_filter.cpp:121
Method
CircularLinkedList
* @brief Creates an empty CircularLinkedList. */
operations_on_datastructures/circular_linked_list.cpp:66
Method
Complex
* \brief Complex Constructor which initialises our complex number. * \details * Complex Constructor which initialises the complex number whi
math/complex_numbers.cpp:43
Method
Convexhull
* Constructor of given class * * @param pointList list of all points in the space * @param n number of points i
geometry/jarvis_algorithm.cpp:66
Method
D_Node
others/lru_cache2.cpp:48
Method
D_Node
others/lfu_cache.cpp:51
Method
DeleteFrom
* @brief Function recursively deletes the substring character by * character iterating through the string to be deleted. It traverses till the * e
operations_on_datastructures/trie_multiple_search.cpp:137
Method
DeleteNode
* @brief Recursive release the tree * @param tree root node of the tree to delete */
data_structures/tree_234.cpp:547
Method
DenseLayer
* Constructor for neural_network::layers::DenseLayer class * @param neurons number of neurons * @param activation activation function for la
machine_learning/neural_network.cpp:141
Method
DigitSeparation
* @brief Default constructor for the DigitSeparation class. */
greedy_algorithms/digit_separation.cpp:40
Method
EasterYearMonthDay
others/easter.cpp:33
Method
Edge
graph/cycle_check_directed_graph.cpp:29
Method
EightPuzzle
* @brief Default constructor for EightPuzzle */
machine_learning/a_star_search.cpp:123
Method
Entry
hashing/quadratic_probing_hash_table.cpp:38
Method
Entry
hashing/double_hash_hash_table.cpp:37
Method
Entry
hashing/linear_probing_hash_table.cpp:36
Method
GetTreeMaxItem
* @brief Get the max item of the tree * @param tree the tree we will get item from * @return max item of the tree */
data_structures/tree_234.cpp:1098
Method
GetTreeMinItem
* @brief Get the min item of the tree * @param tree the tree we will get item from * @return min item of the tree */
data_structures/tree_234.cpp:1115
Method
Graph
* @brief Constructs a graph * @param V number of vertices of the graph */
greedy_algorithms/dijkstra_greedy.cpp:44
Method
Graph
graph/breadth_first_search.cpp:71
Method
Graph
graph/cycle_check_directed_graph.cpp:57
Method
Graph
* @brief Constructor that initializes the graph on creation * @param size number of vertices of the graph */
graph/is_graph_bipartite.cpp:65
Method
Graph
* @brief Constructor for the Graph class * @param nodes Number of nodes in the graph */
graph/topological_sort.cpp:48
Method
Graph
* \brief Populate the adjacency list for each vertex in the graph. * Assumes that evey edge is a pair of valid vertex indices. * * @par
graph/lowest_common_ancestor.cpp:62
Method
Graph
Constructs a graph with V vertices and E edges
dynamic_programming/floyd_warshall.cpp:17
Method
Graph
Constructs a graph with V vertices and E edges
dynamic_programming/bellman_ford.cpp:20
Method
HKGraph
* @brief Constructor for initialization * @param m is the number of vertices on left side of Bipartite Graph * @param n is the number of vertices on
graph/hopcroft_karp.cpp:231
Method
HLD
* @brief Class parameterized constructor. Resizes the and initilizes the * data members. * @param nodes the total number of nodes in the tre
range_queries/heavy_light_decomposition.cpp:441
Method
Info
* @brief Default constructor */
machine_learning/a_star_search.cpp:303
Method
InsertPostMerge
* @brief A insert implementation of post-merge * @param item item to insert */
data_structures/tree_234.cpp:637
Method
InsertPreSplit
* @brief A insert implementation of pre-split * @param item item to insert */
data_structures/tree_234.cpp:585
Method
Knn
* @brief Construct a new Knn object. * @details Using lazy-learning approch, just holds in memory the dataset. * @param X attributes vector
machine_learning/k_nearest_neighbors.cpp:67
Method
LFUCache
* @brief Constructor, Initialize with minFreq and _capacity. * @param _capacity Total capacity of the cache. */
others/lfu_cache.cpp:78
Method
LRUCache
* @brief Constructor, Initialize the head and tail pointers to nullptr and * initialize the _capacity of the cache * @param _capacity Total
others/lru_cache2.cpp:75
Method
LRUCache
* @brief Constructor, Initialize thee LRU class with page frame. * @param pf Page frame or total size of cache. * */
others/lru_cache.cpp:85
Method
LeftRotate
* @brief Do the actual left rotate operation * * Given parent node, and the pivot item index, the left rotate operation is * uniquely identified. T
data_structures/tree_234.cpp:869
Method
LinearSearch
* @brief Search an element using linear search * @param dataArr list * @param val element that will be searched * @return index of elem
data_structures/list_array.cpp:80
Method
ListNode
< pointer to the next node
search/median_search2.cpp:34
Method
LowestCommonAncestor
* \brief Stores the tree and precomputs "up lifts". * @param tree_ rooted tree. */
graph/lowest_common_ancestor.cpp:151
Method
Matrix
divide_and_conquer/strassen_matrix_multiplication.cpp:53
Method
Merge
* @brief Merge the item at index of the parent node, and its left and right * child * * the left and right child node must be 2-node. The 3 items w
data_structures/tree_234.cpp:895
Method
MergeNode
* @brief A helper function used during post-merge insert * * When the inserting leads to overflow, it will split the node to 1 parent * and 2 child
data_structures/tree_234.cpp:700
Method
MergeNodeNotFull
* @brief Merge node to a not-full target node * * Since the target node is not-full, no overflow will happen. So we have * nothing to return. * *
data_structures/tree_234.cpp:730
Method
MinHeap
Constructor: Builds a heap from a given array a[] of given size * \param[in] capacity initial heap capacity */
data_structures/binaryheap.cpp:19
Method
MinHeapNode
greedy_algorithms/huffman.cpp:17
Method
MinHeapify
A recursive method to heapify a subtree with the root at given index * This method assumes that the subtrees are already heapified */
data_structures/binaryheap.cpp:113
Method
MyQueue
* Constructor for queue. */
data_structures/queue_using_two_stacks.cpp:27
Method
NCRModuloP
* @brief constructs an NCRModuloP object allowing to compute (nCr)%p for * inputs from 0 to size */
math/ncr_modulo_p.cpp:107
Method
NeuralNetwork
To store layers * Private Constructor for class NeuralNetwork. This constructor * is used internally to load model. * @param config vector c
machine_learning/neural_network.cpp:256
Method
Node
* Creates node with provided key, level and value * @param key is number that is used for comparision * @param level is the maximum level no
data_structures/skip_list.cpp:44
Method
Node
* @brief Node constructor * @param item the first value we insert to the node */
data_structures/tree_234.cpp:41
Method
Node
< The Node's successor * @brief Creates a new Node with some initial data * @param _data Value of Node */
operations_on_datastructures/circular_linked_list.cpp:39
Method
Node
< The Node's right child * @brief Creates a new Node with some initial data */
operations_on_datastructures/reverse_binary_tree.cpp:41
Method
Node
operations_on_datastructures/get_size_of_linked_list.cpp:8
Function
NumericSort
sorting/numeric_string_sort.cpp:16
Method
Point
construct a point * \param [in] a absicca (default = 0.0) * \param [in] b ordinate (default = 0.0) */
others/smallest_circle.cpp:23
Method
PrintNode
* @brief Print the tree to a dot file. You can convert it to picture with * graphviz * @param ofs output file stream to print to * @param node curr
data_structures/tree_234.cpp:1226
Function
PrintSol
backtracking/n_queens_all_solution_optimised.cpp:30
Method
Queue
data_structures/circular_queue_using_linked_list.cpp:11
Method
RBtree
data_structures/rb_tree.cpp:18
Method
RemovePreMerge
* @brief Main function implement the pre-merge remove operation * @param node the tree to remove item from * @param item item to remove * @return t
data_structures/tree_234.cpp:937
Method
RightRotate
* @brief Do the actual right rotate operation * * Given parent node, and the pivot item index, the right rotate operation * is uniquely identified.
data_structures/tree_234.cpp:845
Method
RootedTree
* \brief Constructs the tree by calculating parent for every vertex. * Assumes a valid description of a tree is provided. * * @param un
graph/lowest_common_ancestor.cpp:93
Method
SG
* @brief Class parameterized constructor. Resizes the and initilizes the * data members. * @param nodes the total number of nodes in the tre
range_queries/heavy_light_decomposition.cpp:286
Method
SegmentTree
data_structures/segment_tree.cpp:87
Method
SelectionTop_3
* @brief Function to display the 3 suggestions with highest frequency * of search hits * @param suggestions a max heap that contains pairs of (fre
operations_on_datastructures/trie_multiple_search.cpp:320
Method
SkipList
* Skip List constructor. Initializes header, start * Node for searching in the list */
data_structures/skip_list.cpp:64
Method
Solution
* @brief A helper solution: launches when a solution for AyStarSearch * is found * @param FinalState the pointer to the obtained final state
machine_learning/a_star_search.cpp:407
Method
SplitNode
* @brief Split a 4-node to 1 parent and 2 children, and return the parent * node * @param node the node to split, it must be a 4-node * @return spl
data_structures/tree_234.cpp:745
Method
Stack
* @brief Constructs a new Stack object * * @param size Maximum size of the stack */
data_structures/stack_using_array.cpp:28
Method
SuggestAutocomplete
* @brief Recursive function to suggest all the entries of trie * which have a given common prefix * @param new_root pointer pointing to the node c
operations_on_datastructures/trie_multiple_search.cpp:249
Method
SuggestFreqAutocomplete
* @brief Recursive function to suggest most frequently * searched entries of trie which have a given common prefix * @param new_root pointer point
operations_on_datastructures/trie_multiple_search.cpp:340
Method
TestCase
hashing/sha256.cpp:290
Method
TestCase
math/ncr_modulo_p.cpp:150
Method
TestCase
math/n_bonacci.cpp:74
Method
TestCase
dynamic_programming/longest_common_string.cpp:59
Method
Tnode
operations_on_datastructures/trie_multiple_search.cpp:50
Method
Treap
< The number of copies per node * @brief Initialization */
data_structures/treap.cpp:55
Method
Tree
* @brief Class parameterized constructor, resizes the and initializes the * data members * @param nodes the total number of nodes in the tre
range_queries/heavy_light_decomposition.cpp:142
Method
Tree234
data_structures/tree_234.cpp:325
Method
Trie
< Constructor
data_structures/trie_using_hashmap.cpp:56
Method
Trie
constructor to initialise the root of the trie.
data_structures/trie_modern.cpp:103
Method
TryLeftRotate
* @brief A handy function to try if we can do a left rotate to the target * node * * Given two node, the parent and the target child, the left rota
data_structures/tree_234.cpp:778
Method
TryRightRotate
* @brief A handy function to try if we can do a right rotate to the target * node * * Given two node, the parent and the target child, the right ro
data_structures/tree_234.cpp:813
Method
WindowedMedian
* @brief Constructs a WindowedMedian object * @param windowSize Sliding window size */
probability/windowed_median.cpp:123
Method
__get_integer_from_string
* @brief Get integer from given string. * @details Create an integer from a given string * @param str integer string, can be hexadecimal (st
ciphers/uint256_t.hpp:43
Method
_erase
* @brief Erase a value from the specified subtree (internal method) * @param x Erase from the subtree of node x (Usually x=root) * @param k
data_structures/treap.cpp:112
Method
_get_k_th
* @brief Find the KTH largest value (internal method) * @param x Query the subtree of node x (Usually x=root) * @param k The queried rank
data_structures/treap.cpp:139
Method
_get_rank
* @brief Query the rank of specified element (internal method) * @param x Query the subtree of node x (Usually x=root) * @param k The querie
data_structures/treap.cpp:155
Method
_insert
* @brief Insert a value into the specified subtree (internal method) * @param x Insert into the subtree of node x (Usually x=root) * @param
data_structures/treap.cpp:85
← previous
next →
1,301–1,400 of 2,100, ranked by callers