MCPcopy Create free account

hub / github.com/TheAlgorithms/C-Plus-Plus / functions

Functions2,100 in github.com/TheAlgorithms/C-Plus-Plus

↓ 1 callersFunctiontest1
* @brief A Test to check an simple case * @returns void */
operations_on_datastructures/array_left_rotation.cpp:75
↓ 1 callersFunctiontest1
< Use the BinaryTree * @brief A Test to check an edge case (single element reversal) */
operations_on_datastructures/reverse_binary_tree.cpp:185
↓ 1 callersFunctiontest1
* @brief A Test to check an edge case (two empty arrays) * @returns void */
operations_on_datastructures/intersection_of_two_arrays.cpp:87
↓ 1 callersFunctiontest1
Test implementation for 10! Result must be 3628800. * @returns True if test pass else False */
math/large_factorial.cpp:17
↓ 1 callersFunctiontest1
* Function for testing the sum_of_digits() function with a * first test case of 119765 and assert statement. */
math/sum_of_digits.cpp:40
↓ 1 callersFunctiontest1
* @brief Self test 1 - using 3x3 randomly generated key * * @param text string to encrypt and decrypt */
ciphers/hill_cipher.cpp:470
↓ 1 callersFunctiontest1
* test function to compute eigen values of a 2x2 matrix * \f[\begin{bmatrix} * 5 & 7\\ * 7 & 11 * \end{bmatrix}\f] * which are approximately, {15
numerical_methods/qr_eigen_values.cpp:177
↓ 1 callersFunctiontest1
* Test LU decomposition * \todo better ways to self-check a matrix output? */
numerical_methods/lu_decompose.cpp:36
↓ 1 callersFunctiontest1
* @brief Test function to find minima for the function * \f$f(x)= (x-2)^2\f$ * in the interval \f$[1,5]\f$ * \n Expected result = 2 */
numerical_methods/golden_search_extrema.cpp:79
↓ 1 callersFunctiontest1
* Self test the algorithm by checking the roots for \f$x^2+4=0\f$ to which the * roots are \f$0 \pm 2i\f$ */
numerical_methods/durand_kerner_roots.cpp:208
↓ 1 callersFunctiontest1
* @brief Test function to find root for the function * \f$f(x)= (x-2)^2\f$ * in the interval \f$[1,5]\f$ * \n Expected result = 2 */
numerical_methods/brent_method_extrema.cpp:144
↓ 1 callersFunctiontest2
* test function to predict points in a 2D coordinate system above the line * \f$x+3y=-1\f$ as +1 and others as -1. * Note that each point is defined
machine_learning/adaline_learning.cpp:262
↓ 1 callersFunctiontest2
Test that creates a random set of points distributed in 4 clusters in * 3D space and trains an SOM that finds the topological pattern. The following
machine_learning/kohonen_som_topology.cpp:451
↓ 1 callersFunctiontest2
Test that creates a random set of points distributed *near* the locus * of the [Lamniscate of * Gerono](https://en.wikipedia.org/wiki/Lemniscate_of_
machine_learning/kohonen_som_trace.cpp:315
↓ 1 callersFunctiontest2
Test case: result should be: * \n Circle with * \n radius 1.4142135623730951 * \n centre at (1.0, 1.0) */
others/smallest_circle.cpp:173
↓ 1 callersFunctiontest2
* @brief Test the computed postorder with the actual postorder. * @param binaryTree instance of BinaryTree class * @param root head/root node of a
others/iterative_tree_traversals.cpp:237
↓ 1 callersFunctiontest2
* @brief 2nd test-case * @returns void */
others/recursive_tree_traversal.cpp:266
↓ 1 callersFunctiontest2
* @brief Self-test implementation #2 * @returns void *******************************************************************************/
search/binary_search.cpp:110
↓ 1 callersFunctiontest2
* @brief Function to test sorting algorithm, one element * @returns void */
sorting/stooge_sort.cpp:57
↓ 1 callersFunctiontest2
* @brief Self-implementations, 2nd test * @returns void */
data_structures/dsu_path_compression.cpp:187
↓ 1 callersFunctiontest2
* @brief Self-implementations, 2nd test * @returns void */
data_structures/dsu_union_rank.cpp:158
↓ 1 callersFunctiontest2
* @brief simple test to insert continuous number of range [0, n), and print * the tree * @param n upper bound of the range number to insert */
data_structures/tree_234.cpp:1281
↓ 1 callersFunctiontest2
* this test is testing if ::hamilton_cycle returns `false` for * \n graph:<pre> * 1 -> 2 -> 3 * | * V * 4</pre> * @return Non
graph/hamiltons_cycle.cpp:103
↓ 1 callersFunctiontest2
* @brief A Test to check a few values * @returns void */
operations_on_datastructures/circular_linked_list.cpp:267
↓ 1 callersFunctiontest2
* @brief A Test to check an edge case (one empty array) * @returns void */
operations_on_datastructures/union_of_two_arrays.cpp:119
↓ 1 callersFunctiontest2
* @brief A Test to check an empty vector * @returns void */
operations_on_datastructures/array_right_rotation.cpp:91
↓ 1 callersFunctiontest2
* @brief A Test to check an empty vector * @returns void */
operations_on_datastructures/array_left_rotation.cpp:90
↓ 1 callersFunctiontest2
* @brief A Test to check an edge case (NULL root element) */
operations_on_datastructures/reverse_binary_tree.cpp:209
↓ 1 callersFunctiontest2
* @brief A Test to check an edge case (one empty array) * @returns void */
operations_on_datastructures/intersection_of_two_arrays.cpp:102
↓ 1 callersFunctiontest2
Test implementation for 100! The result is the 156 digit number: * ``` * 9332621544394415268169923885626670049071596826438162146859296389521759 * 9
math/large_factorial.cpp:54
↓ 1 callersFunctiontest2
* Function for testing the sum_of_digits() function with a * second test case of -12256 and assert statement. */
math/sum_of_digits.cpp:49
↓ 1 callersFunctiontest2
* @brief Self test 2 - using 8x8 randomly generated key * * @param text string to encrypt and decrypt */
ciphers/hill_cipher.cpp:505
↓ 1 callersFunctiontest2
* test function to compute eigen values of a 2x2 matrix * \f[\begin{bmatrix} * -4& 4& 2& 0& -3\\ * 4& -4& 4& -3& -1\\ * 2& 4& 4& 3& -3\\ * 0& -3&
numerical_methods/qr_eigen_values.cpp:210
↓ 1 callersFunctiontest2
* Test determinant computation using LU decomposition */
numerical_methods/lu_decompose.cpp:66
↓ 1 callersFunctiontest2
* @brief Test function to find *maxima* for the function * \f$f(x)= x^{\frac{1}{x}}\f$ * in the interval \f$[-2,10]\f$ * \n Expected result: \f$e\a
numerical_methods/golden_search_extrema.cpp:101
↓ 1 callersFunctiontest2
* Self test the algorithm by checking the roots for \f$0.015625x^3-1=0\f$ to * which the roots are \f$(4+0i),\,(-2\pm3.464i)\f$ */
numerical_methods/durand_kerner_roots.cpp:243
↓ 1 callersFunctiontest2
* @brief Test function to find root for the function * \f$f(x)= x^{\frac{1}{x}}\f$ * in the interval \f$[-2,10]\f$ * \n Expected result: \f$e\appro
numerical_methods/brent_method_extrema.cpp:166
↓ 1 callersFunctiontest3
* test function to predict points in a 3D coordinate system lying within the * sphere of radius 1 and centre at origin as +1 and others as -1. Note t
machine_learning/adaline_learning.cpp:313
↓ 1 callersFunctiontest3
Test that creates a random set of points distributed in eight clusters in * 3D space and trains an SOM that finds the topological pattern. The follow
machine_learning/kohonen_som_topology.cpp:537
↓ 1 callersFunctiontest3
Test that creates a random set of points distributed in six clusters in * 3D space. The following * [CSV](https://en.wikipedia.org/wiki/Comma-separa
machine_learning/kohonen_som_trace.cpp:414
↓ 1 callersFunctiontest3
Test case: result should be: * \n Circle with * \n radius 1.821078397711709 * \n centre at (2.142857142857143, 1.7857142857142856) * @todo This te
others/smallest_circle.cpp:188
↓ 1 callersFunctiontest3
* @brief Test the computed inorder with the actual inorder. * @param binaryTree instance of BinaryTree class * @param root head/root node of a tre
others/iterative_tree_traversals.cpp:264
↓ 1 callersFunctiontest3
* @brief 3rd test-case * @returns void */
others/recursive_tree_traversal.cpp:327
↓ 1 callersFunctiontest3
* @brief Self-test implementation #3 * @returns void *******************************************************************************/
search/binary_search.cpp:127
↓ 1 callersFunctiontest3
* @brief Function to test sorting algorithm, repeating elements * @returns void */
sorting/stooge_sort.cpp:67
↓ 1 callersFunctiontest3
* this test is testing if ::hamilton_cycle returns `true` for * clique with 4 vertices * @return None */
graph/hamiltons_cycle.cpp:122
↓ 1 callersFunctiontest3
* @brief A Test to check an input array * @returns void */
operations_on_datastructures/circular_linked_list.cpp:284
↓ 1 callersFunctiontest3
* @brief A Test to check correct functionality with a simple test case * @returns void */
operations_on_datastructures/union_of_two_arrays.cpp:134
↓ 1 callersFunctiontest3
* @brief A Test to check an invalid shift value * @returns void */
operations_on_datastructures/array_right_rotation.cpp:106
↓ 1 callersFunctiontest3
* @brief A Test to check an invalid shift value * @returns void */
operations_on_datastructures/array_left_rotation.cpp:105
↓ 1 callersFunctiontest3
* @brief A Test to check correct reversal of a Binary Tree */
operations_on_datastructures/reverse_binary_tree.cpp:230
↓ 1 callersFunctiontest3
* @brief A Test to check correct functionality with a simple test case * @returns void */
operations_on_datastructures/intersection_of_two_arrays.cpp:117
↓ 1 callersFunctiontest3
* @brief Test function to find *maxima* for the function * \f$f(x)= \cos x\f$ * in the interval \f$[0,12]\f$ * \n Expected result: \f$\pi\approx 3.
numerical_methods/golden_search_extrema.cpp:124
↓ 1 callersFunctiontest3
* @brief Test function to find *maxima* for the function * \f$f(x)= \cos x\f$ * in the interval \f$[0,12]\f$ * \n Expected result: \f$\pi\approx 3.
numerical_methods/brent_method_extrema.cpp:189
↓ 1 callersFunctiontest4
* @brief Test the computed preorder with the actual preorder on negative value. * @param binaryTree instance of BinaryTree class * @param root hea
others/iterative_tree_traversals.cpp:291
↓ 1 callersFunctiontest4
* @brief A Test to check using a specific Node as the starting point * @returns void */
operations_on_datastructures/circular_linked_list.cpp:299
↓ 1 callersFunctiontest4
* @brief A Test to check correct functionality with duplicate values * @returns void */
operations_on_datastructures/union_of_two_arrays.cpp:150
↓ 1 callersFunctiontest4
* @brief A Test to check a very large input * @returns void */
operations_on_datastructures/array_right_rotation.cpp:121
↓ 1 callersFunctiontest4
* @brief A Test to check a very large input * @returns void */
operations_on_datastructures/array_left_rotation.cpp:120
↓ 1 callersFunctiontest4
* @brief A Test to check correct functionality with duplicate values * @returns void */
operations_on_datastructures/intersection_of_two_arrays.cpp:133
↓ 1 callersFunctiontest5
* @brief Test the computed postorder with the actual postorder on negative * value. * @param binaryTree instance of BinaryTree class * @param ro
others/iterative_tree_traversals.cpp:319
↓ 1 callersFunctiontest5
* @brief A Test to check an empty list * @returns void */
operations_on_datastructures/circular_linked_list.cpp:317
↓ 1 callersFunctiontest5
* @brief A Test to check correct functionality with a harder test case * @returns void */
operations_on_datastructures/union_of_two_arrays.cpp:166
↓ 1 callersFunctiontest5
* @brief A Test to check a shift of zero * @returns void */
operations_on_datastructures/array_right_rotation.cpp:144
↓ 1 callersFunctiontest5
* @brief A Test to check a shift of zero * @returns void */
operations_on_datastructures/array_left_rotation.cpp:143
↓ 1 callersFunctiontest5
* @brief A Test to check correct functionality with a harder test case * @returns void */
operations_on_datastructures/intersection_of_two_arrays.cpp:149
↓ 1 callersFunctiontest6
* @brief Test the computed inorder with the actual inorder on negative value. * @param binaryTree instance of BinaryTree class * @param root head/
others/iterative_tree_traversals.cpp:346
↓ 1 callersFunctiontest6
* @brief A Test to check correct functionality with an array sorted using * std::sort * @returns void */
operations_on_datastructures/union_of_two_arrays.cpp:183
↓ 1 callersFunctiontest6
* @brief A Test to check correct functionality with an array sorted using * std::sort * @returns void */
operations_on_datastructures/intersection_of_two_arrays.cpp:166
↓ 1 callersFunctiontestAssign
data_structures/test_stack.cpp:132
↓ 1 callersFunctiontestClear
data_structures/test_stack.cpp:51
↓ 1 callersFunctiontestCopyOfStackHasSameData
data_structures/test_stack.cpp:59
↓ 1 callersFunctiontestDeQueue
data_structures/test_queue.cpp:23
↓ 1 callersFunctiontestDeQueueThrowsAnInvalidArgumentWhenQueueEmpty
data_structures/test_queue.cpp:67
↓ 1 callersFunctiontestEnQueue
data_structures/test_queue.cpp:12
↓ 1 callersFunctiontestFrontThrowsAnInvalidArgumentWhenQueueEmpty
data_structures/test_queue.cpp:56
↓ 1 callersFunctiontestPop
data_structures/test_stack.cpp:35
↓ 1 callersFunctiontestPopThrowsAnInvalidArgumentWhenStackEmpty
data_structures/test_stack.cpp:171
↓ 1 callersFunctiontestPoppingFromCopyDoesNotChangeOriginal
data_structures/test_stack.cpp:84
↓ 1 callersFunctiontestPoppingFromOrginalDoesNotChangeCopy
data_structures/test_stack.cpp:116
↓ 1 callersFunctiontestPush
data_structures/test_stack.cpp:14
↓ 1 callersFunctiontestPushingToCopyDoesNotChangeOriginal
data_structures/test_stack.cpp:68
↓ 1 callersFunctiontestPushingToOrginalDoesNotChangeCopy
data_structures/test_stack.cpp:100
↓ 1 callersFunctiontestQueueAfterClearIsEmpty
data_structures/test_queue.cpp:47
↓ 1 callersFunctiontestTopThrowsAnInvalidArgumentWhenStackEmpty
data_structures/test_stack.cpp:160
↓ 1 callersFunctiontest_1
* @brief A simple test case * The assert statement will check expected hist and miss to resultant hits and * miss * @returns void * */
others/lru_cache.cpp:160
↓ 1 callersFunctiontest_1
* Test implementations * @returns none */
range_queries/heavy_light_decomposition.cpp:511
↓ 1 callersFunctiontest_1
* Test function 1 with unsorted array * {8, 3, 2, 7, 4, 6, 8} * @returns none */
sorting/pigeonhole_sort.cpp:68
↓ 1 callersFunctiontest_2
* @brief A test case contains hits more than cache size * The assert statement will check expected hist and miss to resultant hits and * miss * @re
others/lru_cache.cpp:187
↓ 1 callersFunctiontest_2
* Second test implementations * @returns void */
range_queries/heavy_light_decomposition.cpp:555
↓ 1 callersFunctiontest_2
* Test function 2 with unsorted array * {802, 630, 20, 745, 52, 300, 612, 932, 78, 187} * @returns none */
sorting/pigeonhole_sort.cpp:88
↓ 1 callersFunctiontest_2d_classes
Creates a random set of points distributed in four clusters in * 3D space with centroids at the points * * \f$(0,5, 0.5, 0.5)\f$ * * \f$(0,5,-0.5,
machine_learning/kohonen_som_topology.cpp:330
↓ 1 callersFunctiontest_3
* @brief A simple test case * The assert statement will check expected hist and miss to resultant hits and * miss * @returns void * */
others/lru_cache.cpp:214
↓ 1 callersFunctiontest_3
* Third test implementations * @returns void */
range_queries/heavy_light_decomposition.cpp:599
↓ 1 callersFunctiontest_3
* Test function 1 with unsorted array * {11,13,12,14} * @returns none */
sorting/pigeonhole_sort.cpp:109
↓ 1 callersFunctiontest_3d_classes
Creates a random set of points distributed in six clusters in * 3D space with centroids at the points * * \f${0.5, 0.5, 0.5}\f$ * * \f${0.5, 0.5, -
machine_learning/kohonen_som_trace.cpp:359
↓ 1 callersFunctiontest_3d_classes1
Creates a random set of points distributed in four clusters in * 3D space with centroids at the points * * \f$(0,5, 0.5, 0.5)\f$ * * \f$(0,5,-0.5,
machine_learning/kohonen_som_topology.cpp:411
↓ 1 callersFunctiontest_3d_classes2
Creates a random set of points distributed in four clusters in * 3D space with centroids at the points * * \f$(0,5, 0.5, 0.5)\f$ * * \f$(0,5,-0.5,
machine_learning/kohonen_som_topology.cpp:493
↓ 1 callersFunctiontest_MemorisedFactorial_in_order
math/factorial_memoization.cpp:44
↓ 1 callersFunctiontest_MemorisedFactorial_no_order
math/factorial_memoization.cpp:52
← previousnext →1,101–1,200 of 2,100, ranked by callers