MCPcopy Create free account

hub / github.com/TheAlgorithms/Python / types & classes

Types & classes310 in github.com/TheAlgorithms/Python

↓ 88 callersClassPoint
A point in 2D space. >>> Point(0, 0) Point(x=0.0, y=0.0) >>> Point(1.5, 2.5) Point(x=1.5, y=2.5)
geometry/graham_scan.py:28
↓ 47 callersClassPoint
Represents a 2D point with x and y coordinates.
geometry/jarvis_march.py:25
↓ 39 callersClassRedBlackTree
A Red-Black tree, which is a self-balancing BST (binary search tree). This tree has similar performance to AVL trees, but the balancin
data_structures/binary_tree/red_black_tree.py:6
↓ 27 callersClassVector
This class represents a vector of arbitrary size. You need to give the vector components. Overview of the methods: __init__(com
linear_algebra/src/lib.py:30
↓ 17 callersClassMatrix
class: Matrix This class represents an arbitrary matrix. Overview of the methods: __init__(): __str__(): returns a stri
linear_algebra/src/lib.py:243
↓ 17 callersClassNode
A Node has value variable and pointers to Nodes to its left and right.
data_structures/binary_tree/mirror_binary_tree.py:14
↓ 17 callersClassPokerHand
Create an object representing a Poker Hand based on an input of a string which represents the best 5-card combination from the player's hand a
project_euler/problem_054/sol1.py:49
↓ 14 callersClassNode
data_structures/binary_tree/is_sum_tree.py:14
↓ 14 callersClassNode
A Node represents an element of a binary tree, which contains: Attributes: data: The value stored in the node (int). left: Pointer t
data_structures/binary_tree/symmetric_tree.py:14
↓ 12 callersClassGraphAdjacencyList
graphs/graph_adjacency_list.py:31
↓ 12 callersClassGraphAdjacencyMatrix
graphs/graph_adjacency_matrix.py:31
↓ 10 callersClassNode
data_structures/binary_tree/basic_binary_tree.py:8
↓ 10 callersClassSkipList
data_structures/linked_list/skip_list.py:52
↓ 9 callersClassMatrix
Matrix object generated from a 2D array where each element is an array representing a row. Rows can contain type int or float. Common
matrix/matrix_class.py:6
↓ 9 callersClassNode
data_structures/linked_list/has_loop.py:10
↓ 9 callersClassNode
A binary node has value variable and pointers to its left and right node.
data_structures/binary_tree/merge_two_binary_trees.py:12
↓ 8 callersClassDual
maths/dual_number_automatic_differentiation.py:11
↓ 8 callersClassFromTo
conversions/length_conversion.py:28
↓ 8 callersClassFromTo
conversions/pressure_conversions.py:25
↓ 8 callersClassMatrix
<class Matrix> Matrix structure.
matrix/sherman_morrison.py:6
↓ 8 callersClassProcess
scheduling/multi_level_feedback_queue.py:4
↓ 8 callersClassSearchProblem
An interface to define search problems. The interface will be illustrated using the example of mathematical function.
searches/hill_climbing.py:5
↓ 7 callersClassBody
physics/n_body_simulation.py:28
↓ 7 callersClassFromTo
conversions/volume_conversions.py:24
↓ 7 callersClassIIRFilter
r""" N-Order IIR filter Assumes working with float samples normalized on [-1, 1] --- Implementation details: Based on the 2nd-or
audio_filters/iir_filter.py:4
↓ 7 callersClassPolynomial
maths/polynomials/single_indeterminate_operations.py:15
↓ 6 callersClassGradientTracker
Class contains methods to compute partial derivatives of Variable based on the computation graph. Examples: >>> with GradientTracke
machine_learning/automatic_differentiation.py:156
↓ 6 callersClassTreeNode
A binary tree node has a value, left child, and right child. Props: value: The value of the node. left: The left child of th
data_structures/binary_tree/serialize_deserialize_binary_tree.py:8
↓ 6 callersClassTreeNode
A TreeNode has data variable and pointers to TreeNode objects for its left and right children.
data_structures/binary_tree/flatten_binarytree_to_linkedlist.py:17
↓ 6 callersClassVariable
Class represents n-dimensional object which is used to wrap numpy array on which operations will be performed and the gradient will be calcul
machine_learning/automatic_differentiation.py:35
↓ 5 callersClassFuzzySet
A class for representing and manipulating triangular fuzzy sets. Attributes: name: The name or label of the fuzzy set. left_b
fuzzy_logic/fuzzy_operations.py:16
↓ 5 callersClassNode
data_structures/heap/min_heap.py:5
↓ 5 callersClassNode
data_structures/binary_tree/diameter_of_binary_tree.py:12
↓ 5 callersClassNode
data_structures/binary_tree/binary_tree_traversals.py:10
↓ 5 callersClassStack
A stack is an abstract data type that serves as a collection of elements with two principal operations: push() and pop(). push() adds an eleme
data_structures/stacks/stack.py:16
↓ 5 callersClassTreeNode
data_structures/binary_tree/diff_views_of_binary_tree.py:16
↓ 4 callersClassNode
Create and initialize Node class instance. >>> Node(20) Node(20) >>> Node("Hello, world!") Node(Hello, world!) >>> Node(None)
data_structures/linked_list/singly_linked_list.py:9
↓ 4 callersClassQueue
data_structures/queues/queue_on_pseudo_stack.py:6
↓ 4 callersClassRadixNode
data_structures/trie/radix_tree.py:8
↓ 4 callersClass_DataSet
Container class for a _DataSet (deprecated). THIS CLASS IS DEPRECATED.
neural_network/input_data.py:114
↓ 3 callersClassAStar
>>> astar = AStar((0, 0), (len(grid) - 1, len(grid[0]) - 1)) >>> (astar.start.pos_y + delta[3][0], astar.start.pos_x + delta[3][1]) (0, 1
graphs/bidirectional_a_star.py:78
↓ 3 callersClassBezierCurve
Bezier curve is a weighted sum of a set of control points. Generate Bezier curves from a given set of control points. This implementation
graphics/bezier_curve.py:8
↓ 3 callersClassBinarySearchTree
data_structures/binary_tree/binary_search_tree_recursive.py:27
↓ 3 callersClassBodySystem
This class is used to hold the bodies, the gravitation constant, the time factor and the softening factor. The time factor is used to contr
physics/n_body_simulation.py:112
↓ 3 callersClassBreadthFirstSearch
# Comment out slow pytests... # 9.15s call graphs/bidirectional_breadth_first_search.py:: \ # graphs.bidirectional_bre
graphs/bidirectional_breadth_first_search.py:36
↓ 3 callersClassCell
Class cell represents a cell in the world which have the properties: position: represented by tuple of x and y coordinates initially set to (
machine_learning/astar.py:19
↓ 3 callersClassCovidData
web_programming/covid_stats_via_xpath.py:22
↓ 3 callersClassDecisionTree
machine_learning/decision_tree.py:10
↓ 3 callersClassDoubleLinkedListNode
Double Linked List Node built specifically for LRU Cache >>> DoubleLinkedListNode(1,1) Node: key: 1, val: 1, has next: False, has prev:
other/lru_cache.py:10
↓ 3 callersClassDoubleLinkedListNode
Double Linked List Node built specifically for LFU Cache >>> node = DoubleLinkedListNode(1,1) >>> node Node: key: 1, val: 1, freq: 0
other/lfu_cache.py:10
↓ 3 callersClassKernel
machine_learning/sequential_minimum_optimization.py:404
↓ 3 callersClassLinkedList
data_structures/linked_list/singly_linked_list.py:40
↓ 3 callersClassMatrix
maths/matrix_exponentiation.py:13
↓ 3 callersClassNode
sorts/tree_sort.py:14
↓ 3 callersClassNode
graphs/bidirectional_breadth_first_search.py:24
↓ 3 callersClassNode
>>> k = Node(0, 0, 4, 5, 0, None) >>> k.calculate_heuristic() 9 >>> n = Node(1, 4, 3, 4, 2, None) >>> n.calculate_heuristic()
graphs/greedy_best_first.py:40
↓ 3 callersClassNode
>>> k = Node(0, 0, 4, 3, 0, None) >>> k.calculate_heuristic() 5.0 >>> n = Node(1, 4, 3, 4, 2, None) >>> n.calculate_heuristic()
graphs/bidirectional_a_star.py:28
↓ 3 callersClassNode
data_structures/linked_list/reverse_k_group.py:8
↓ 3 callersClassNode
data_structures/binary_tree/is_sorted.py:24
↓ 3 callersClassPriorityQueue
graphs/dijkstra_algorithm.py:11
↓ 3 callersClassResult
electronics/electric_power.py:7
↓ 3 callersClassSegmentTree
data_structures/binary_tree/non_recursive_segment_tree.py:47
↓ 3 callersClassSmoSVM
machine_learning/sequential_minimum_optimization.py:47
↓ 3 callersClassTreeNode
A node in a Frequent Pattern tree. Args: name: The name of this node. num_occur: The number of occurrences of the node.
machine_learning/frequent_pattern_growth.py:19
↓ 3 callersClassTreeNode
searches/binary_tree_traversal.py:10
↓ 2 callersClassBinaryTree
data_structures/binary_tree/is_sum_tree.py:72
↓ 2 callersClassBinaryTree
data_structures/binary_tree/basic_binary_tree.py:32
↓ 2 callersClassCoinsDistribResult
data_structures/binary_tree/distribute_coins.py:53
↓ 2 callersClassEntity
Represents an entity (either prey or predator). >>> e = Entity(True, coords=(0, 0)) >>> e.prey True >>> e.coords (0, 0)
cellular_automata/wa_tor.py:38
↓ 2 callersClassGraph
A class representing an undirected weighted graph.
project_euler/problem_107/sol1.py:39
↓ 2 callersClassHashMap
Hash map with open addressing.
data_structures/hashing/hash_map.py:36
↓ 2 callersClassHeap
A Max Heap Implementation >>> unsorted = [103, 9, 1, 7, 11, 15, 25, 201, 209, 107, 5] >>> h = Heap() >>> h.build_max_heap(unsorted) >
data_structures/heap/heap.py:25
↓ 2 callersClassInstagramUser
Class Instagram crawl instagram user information Usage: (doctest failing on GitHub Actions) # >>> instagram_user = InstagramUser("github
web_programming/instagram_crawler.py:32
↓ 2 callersClassNode
data_structures/queues/circular_queue_linked_list.py:151
↓ 2 callersClassNode
data_structures/linked_list/__init__.py:14
↓ 2 callersClassNode
data_structures/linked_list/doubly_linked_list_two.py:19
↓ 2 callersClassNode
data_structures/linked_list/from_sequence.py:7
↓ 2 callersClassNode
data_structures/linked_list/print_reverse.py:8
↓ 2 callersClassNode
Node in a doubly-linked binomial tree, containing: - value - size of left subtree - link to left, right and parent no
data_structures/heap/binomial_heap.py:7
↓ 2 callersClassNode
data_structures/stacks/stack_with_doubly_linked_list.py:11
↓ 2 callersClassOnepad
ciphers/onepad_cipher.py:4
↓ 2 callersClassOperation
Class represents operation between single or two Variable objects. Operation objects contains type of operation, pointers to input Variable
machine_learning/automatic_differentiation.py:131
↓ 2 callersClassSHA1Hash
Class to contain the entire pipeline for SHA1 hashing algorithm >>> SHA1Hash(bytes('Allan', 'utf-8')).final_hash() '872af2d8ac3d8695387e7
hashes/sha1.py:34
↓ 2 callersClassSHA256
Class to contain the entire pipeline for SHA1 Hashing Algorithm >>> SHA256(b'Python').hash '18885f27b5af9012df19e496460f9294d5ab7612
hashes/sha256.py:23
↓ 2 callersClassSegmentTreeNode
data_structures/binary_tree/segment_tree_other.py:11
↓ 2 callersClassSide
A side of a two dimensional Shape such as Polygon, etc. adjacent_sides: a list of sides which are adjacent to the current side angle: the
geometry/geometry.py:38
↓ 2 callersClassSuffixTree
data_structures/suffix_tree/suffix_tree.py:12
↓ 2 callersClassSuffixTreeNode
data_structures/suffix_tree/suffix_tree_node.py:12
↓ 2 callersClassToken
Dataclass representing triplet called token consisting of length, offset and indicator. This triplet is used during LZ77 compression.
data_compression/lz77.py:38
↓ 2 callersClassTrieNode
data_structures/trie/trie.py:9
↓ 2 callersClassUnderFlowError
data_structures/queues/priority_queue_using_list.py:11
↓ 2 callersClass_Datasets
neural_network/input_data.py:31
↓ 1 callersClassAVLtree
An AVL tree doctest Examples: >>> t = AVLtree() >>> t.insert(4) insert:4 >>> print(str(t).replace(" \\n","\\n")) 4 *
data_structures/binary_tree/avl_tree.py:245
↓ 1 callersClassAssignmentUsingBitmask
dynamic_programming/bitmask.py:15
↓ 1 callersClassBPNN
Back Propagation Neural Network model
neural_network/back_propagation_neural_network.py:99
↓ 1 callersClassBidirectionalAStar
>>> bd_astar = BidirectionalAStar((0, 0), (len(grid) - 1, len(grid[0]) - 1)) >>> bd_astar.fwd_astar.start.pos == bd_astar.bwd_astar.target.po
graphs/bidirectional_a_star.py:171
↓ 1 callersClassBidirectionalBreadthFirstSearch
>>> bd_bfs = BidirectionalBreadthFirstSearch((0, 0), (len(grid) - 1, ... len(grid[0]) - 1))
graphs/bidirectional_breadth_first_search.py:111
↓ 1 callersClassBinaryHeap
A max-heap implementation in Python >>> binary_heap = BinaryHeap() >>> binary_heap.insert(6) >>> binary_heap.insert(10) >>> binar
data_structures/heap/max_heap.py:1
↓ 1 callersClassBinaryTreeNode
Defining the structure of BinaryTreeNode
data_structures/binary_tree/inorder_tree_traversal_2022.py:8
↓ 1 callersClassBinomialHeap
r""" Min-oriented priority queue implemented with the Binomial Heap data structure implemented with the BinomialHeap class. It supports:
data_structures/heap/binomial_heap.py:48
next →1–100 of 310, ranked by callers