MCPcopy Create free account

hub / github.com/TheAlgorithms/Python / functions

Functions3,909 in github.com/TheAlgorithms/Python

Methodtest_collinear_points
Test that collinear points return empty hull.
geometry/tests/test_jarvis_march.py:47
Functiontest_compare_random
(hand, other, expected)
project_euler/problem_054/test_poker_hand.py:183
Functiontest_compare_simple
(hand, other, expected)
project_euler/problem_054/test_poker_hand.py:178
Methodtest_component
test for method component()
linear_algebra/src/test_linear_algebra.py:25
Methodtest_component_matrix
test for Matrix method component()
linear_algebra/src/test_linear_algebra.py:179
Functiontest_consecutive_orientation
Test orientation calculation.
geometry/tests/test_graham_scan.py:207
Methodtest_contains_edge
(self)
graphs/graph_adjacency_matrix.py:412
Methodtest_contains_edge
(self)
graphs/graph_adjacency_list.py:400
Methodtest_contains_edge_exception_check
(self)
graphs/graph_adjacency_matrix.py:588
Methodtest_contains_edge_exception_check
(self)
graphs/graph_adjacency_list.py:576
Methodtest_contains_vertex
(self)
graphs/graph_adjacency_matrix.py:311
Methodtest_contains_vertex
(self)
graphs/graph_adjacency_list.py:299
Functiontest_convert_to_negative
()
digital_image_processing/test_digital_image_processing.py:27
Functiontest_convolve_filter
()
digital_image_processing/test_digital_image_processing.py:64
Methodtest_copy
test for method copy()
linear_algebra/src/test_linear_algebra.py:111
Functiontest_custom_sort_five_high_straight
()
project_euler/problem_054/test_poker_hand.py:196
Methodtest_determinant
test for Matrix method determinant()
linear_algebra/src/test_linear_algebra.py:155
Functiontest_doubly_linked_list
>>> test_doubly_linked_list()
data_structures/linked_list/doubly_linked_list.py:191
Functiontest_duplicate_points
Test with all duplicate points.
geometry/tests/test_graham_scan.py:23
Methodtest_duplicate_points
Test handling of duplicate points.
geometry/tests/test_jarvis_march.py:97
Methodtest_easy_case
test for the easy case
knapsack/tests/test_knapsack.py:31
Functiontest_edge_cases
Test edge cases such as an empty KD-Tree.
data_structures/kd_tree/tests/test_kdtree.py:88
Methodtest_empty
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:497
Methodtest_empty_list
Test empty list returns empty hull.
geometry/tests/test_jarvis_march.py:77
Functiontest_empty_points
Test with no points.
geometry/tests/test_graham_scan.py:8
Functiontest_end_to_end
>>> test_end_to_end() 'Hello, this is a modified Caesar cipher'
ciphers/shuffled_shift_cipher.py:172
Functiontest_euclidean_distance
Test Euclidean distance calculation.
geometry/tests/test_graham_scan.py:199
Methodtest_euclidean_length
test for method euclidean_length()
linear_algebra/src/test_linear_algebra.py:48
Functiontest_euler_project
()
project_euler/problem_054/test_poker_hand.py:214
Methodtest_exists
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:509
Functiontest_f1
(x, y)
searches/simulated_annealing.py:99
Functiontest_f1
(x, y)
searches/hill_climbing.py:167
Functiontest_f2
(x, y)
searches/simulated_annealing.py:122
Functiontest_f2
(x, y)
searches/hill_climbing.py:188
Functiontest_fetch_github_info
(monkeypatch)
web_programming/test_fetch_github_info.py:8
Functiontest_float_number
(function)
maths/test_factorial.py:37
Functiontest_gen_gaussian_kernel
()
digital_image_processing/test_digital_image_processing.py:43
Functiontest_gen_gaussian_kernel_filter
()
digital_image_processing/test_digital_image_processing.py:60
Methodtest_get_max_label
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:515
Methodtest_get_min_label
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:524
Functiontest_greedy
>>> food = ["Burger", "Pizza", "Coca Cola", "Rice", ... "Sambhar", "Chicken", "Fries", "Milk"] >>> value = [80, 100, 60, 70, 50,
other/greedy.py:42
Functiontest_hand_is_five_high_straight
(hand, expected, card_values)
project_euler/problem_054/test_poker_hand.py:161
Functiontest_hand_is_flush
(hand, expected)
project_euler/problem_054/test_poker_hand.py:151
Functiontest_hand_is_same_kind
(hand, expected)
project_euler/problem_054/test_poker_hand.py:168
Functiontest_hand_is_straight
(hand, expected)
project_euler/problem_054/test_poker_hand.py:156
Functiontest_hand_sorted
()
project_euler/problem_054/test_poker_hand.py:187
Functiontest_hand_values
(hand, expected)
project_euler/problem_054/test_poker_hand.py:173
Functiontest_hash_map_is_the_same_as_dict
(operations)
data_structures/hashing/tests/test_hash_map.py:77
Functiontest_heap
>>> h = Heap() # Max-heap >>> h.insert_item(5, 34) >>> h.insert_item(6, 31) >>> h.insert_item(7, 37) >>> h.get_top() [7, 37]
data_structures/heap/heap_generic.py:131
Functiontest_identity
()
matrix/tests/test_matrix_operation.py:104
Methodtest_improper_a_b_dimensions
(self)
linear_algebra/src/schur_complement.py:77
Methodtest_improper_b_c_dimensions
(self)
linear_algebra/src/schur_complement.py:85
Methodtest_init_check
(self)
graphs/graph_adjacency_matrix.py:289
Methodtest_init_check
(self)
graphs/graph_adjacency_list.py:278
Methodtest_inorder_traversal
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:533
Functiontest_instagram_user
A self running doctest >>> test_instagram_user()
web_programming/instagram_crawler.py:110
Methodtest_is_empty
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:502
Functiontest_johnson_basic
()
graphs/tests/test_johnson.py:8
Functiontest_johnson_negative_cycle
()
graphs/tests/test_johnson.py:21
Methodtest_knapsack
test for the knapsack
knapsack/tests/test_knapsack.py:41
Methodtest_knapsack_repetition
test for the knapsack repetition
knapsack/tests/test_knapsack.py:51
Functiontest_kruskal_successful_result
()
graphs/tests/test_min_spanning_tree_kruskal.py:4
Functiontest_large_hull
Test with a larger set of points.
geometry/tests/test_graham_scan.py:220
Functiontest_large_number
(function)
maths/test_factorial.py:26
Methodtest_lcm_function
(self)
maths/least_common_multiple.py:65
Functiontest_linear_discriminant_analysis
()
machine_learning/dimensionality_reduction.py:164
Functiontest_local_binary_pattern
()
digital_image_processing/test_digital_image_processing.py:100
Methodtest_match_hashes
(self)
hashes/sha256.py:202
Functiontest_median_filter
()
digital_image_processing/test_digital_image_processing.py:71
Functiontest_min_max
Tests the min and max functions in the tree.
data_structures/binary_tree/red_black_tree.py:645
Methodtest_minor
test for Matrix method minor()
linear_algebra/src/test_linear_algebra.py:135
Functiontest_motion
Test motion >>> test_motion()
physics/horizontal_projectile_motion.py:138
Methodtest_mul
test for * operator
linear_algebra/src/test_linear_algebra.py:81
Functiontest_multiple_calls_five_high_straight
()
project_euler/problem_054/test_poker_hand.py:203
Functiontest_multiplication
(mat1, mat2)
matrix/tests/test_matrix_operation.py:78
Functiontest_nearest_neighbour
( file_path: str = "digital_image_processing/image_data/lena_small.jpg", )
digital_image_processing/test_digital_image_processing.py:92
Functiontest_nearest_neighbour_search
Test the nearest neighbor search function.
data_structures/kd_tree/tests/test_kdtree.py:61
Methodtest_negative_max_weight
Returns ValueError for any negative max_weight value :return: ValueError
knapsack/tests/test_greedy_knapsack.py:23
Functiontest_negative_number
(function)
maths/test_factorial.py:31
Methodtest_negative_profit_value
Returns ValueError for any negative profit value in the list :return: ValueError
knapsack/tests/test_greedy_knapsack.py:33
Methodtest_negative_weight_value
Returns ValueError for any negative weight value in the list :return: ValueError
knapsack/tests/test_greedy_knapsack.py:43
Functiontest_no_new_methods_was_added_to_api
()
data_structures/hashing/tests/test_hash_map.py:90
Methodtest_not_primes
(self)
maths/prime_check.py:73
Methodtest_null_max_weight
Returns ValueError for any zero max_weight value :return: ValueError
knapsack/tests/test_greedy_knapsack.py:53
Methodtest_pentagon
Test convex hull of a pentagon.
geometry/tests/test_jarvis_march.py:104
Functiontest_point_comparison
Test Point comparison for sorting.
geometry/tests/test_graham_scan.py:188
Methodtest_point_creation
Test Point initialization.
geometry/tests/test_jarvis_march.py:11
Functiontest_point_equality
Test Point equality.
geometry/tests/test_graham_scan.py:178
Methodtest_point_equality
Test Point equality comparison.
geometry/tests/test_jarvis_march.py:17
Methodtest_point_hash
Test Point hashing.
geometry/tests/test_jarvis_march.py:30
Methodtest_point_repr
Test Point string representation.
geometry/tests/test_jarvis_march.py:25
Functiontest_positive_integers
(function)
maths/test_factorial.py:19
Methodtest_preorder_traversal
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:539
Functiontest_prim_successful_result
()
graphs/tests/test_min_spanning_tree_prim.py:6
Methodtest_primes
(self)
maths/prime_check.py:61
Functiontest_principal_component_analysis
()
machine_learning/dimensionality_reduction.py:183
Functiontest_project_euler
Testing for all Project Euler solutions
scripts/validate_solutions.py:98
Methodtest_put
(self)
data_structures/binary_tree/binary_search_tree_recursive.py:307
Functiontest_random_order
Test that point order doesn't affect the result.
geometry/tests/test_graham_scan.py:246
Functiontest_rectangle
Test with a rectangle (4 points).
geometry/tests/test_graham_scan.py:56
← previousnext →3,701–3,800 of 3,909, ranked by callers