MCPcopy Create free account

hub / github.com/TheAlgorithms/Python / functions

Functions3,909 in github.com/TheAlgorithms/Python

Method__init__
(self, world_size=(5, 5))
machine_learning/astar.py:53
Method__init__
Create a kNN classifier using the given training data and class labels
machine_learning/k_nearest_neighbours.py:24
Method__init__
( self, train, kernel_func, alpha_list=None, cost=0.4, b=0.0,
machine_learning/sequential_minimum_optimization.py:48
Method__init__
(self, kernel, degree=1.0, coef0=0.0, gamma=1.0)
machine_learning/sequential_minimum_optimization.py:405
Method__init__
(self, value: Any)
machine_learning/automatic_differentiation.py:51
Method__init__
( self, op_type: OpType, other_params: dict | None = None, )
machine_learning/automatic_differentiation.py:138
Method__init__
(self)
machine_learning/automatic_differentiation.py:206
Method__init__
(self, text: str, pattern: str)
strings/boyer_moore_search.py:32
Method__init__
(self, keywords: list[str])
strings/aho_corasick.py:7
Method__init__
(self)
strings/autocomplete_using_trie.py:7
Method__init__
(self, word: str, count: int)
strings/top_k_frequent_words.py:24
Method__init__
k : is an empirically determined constant in [0.04,0.06] window_size : neighbourhoods considered
computer_vision/harris_corner.py:11
Method__init__
(self, window_size: int = 13, lookahead_buffer_size: int = 6)
data_compression/lz77.py:64
Method__init__
Initialize the CoordinateCompressor with a list. Args: arr: The list of values to be compressed. >>> arr = [100, 10
data_compression/coordinate_compression.py:33
Method__init__
(self, letter: str, freq: int)
data_compression/huffman.py:7
Method__init__
(self, freq: int, left: Letter | TreeNode, right: Letter | TreeNode)
data_compression/huffman.py:17
Method__init__
First signal and second signal are stored as 1-D array
electronics/circular_convolution.py:26
Method__init__
(self, process_name: str, arrival_time: int, burst_time: int)
scheduling/multi_level_feedback_queue.py:5
Method__init__
( self, number_of_queues: int, time_slices: list[int], queue: deque[Process],
scheduling/multi_level_feedback_queue.py:25
Method__init__
( self, tableau: np.ndarray, n_vars: int, n_artificial_vars: int )
linear_programming/simplex.py:43
Method__init__
This function initializes the TwoHiddenLayerNeuralNetwork class with random weights for every layer and initializes predicted output
neural_network/two_hidden_layers_neural_network.py:12
Method__init__
:param conv1_get: [a,c,d], size, number, step of convolution kernel :param size_p1: pooling size :param bp_num1: units number
neural_network/convolution_neural_network.py:24
Method__init__
Construct a _DataSet. one_hot arg is used only if fake_data is true. `dtype` can be either `uint8` to leave the input as `[0, 255]`,
neural_network/input_data.py:125
Method__init__
common connected layer of bp network :param units: numbers of neural units :param activation: activation function :pa
neural_network/back_propagation_neural_network.py:34
Method__init__
(self)
neural_network/back_propagation_neural_network.py:104
Method__init__
Initiates the variables data and h. h is a list of 5 8-digit hexadecimal numbers corresponding to (1732584193, 4023233417, 25
hashes/sha1.py:41
Method__init__
(self, data: bytes)
hashes/sha256.py:34
Method__init__
(self, filename)
sorts/external_sort.py:13
Method__init__
(self, files)
sorts/external_sort.py:60
Method__init__
(self, merge_strategy)
sorts/external_sort.py:90
Method__init__
(self, block_size)
sorts/external_sort.py:110
Method__init__
Initialize a 2D point. Args: x_coordinate: The x-coordinate (horizontal position) of the point y_coordinate:
geometry/graham_scan.py:41
Method__init__
(self, short_side_length: float, long_side_length: float)
geometry/geometry.py:241
Method__init__
(self, side_length: float)
geometry/geometry.py:277
Method__init__
(self, x_coordinate: float, y_coordinate: float)
geometry/jarvis_march.py:28
Method__init__
(self, width: int, height: int)
cellular_automata/langtons_ant.py:28
Method__init__
(self, prey: bool, coords: tuple[int, int])
cellular_automata/wa_tor.py:51
Method__init__
(self, width: int, height: int)
cellular_automata/wa_tor.py:118
Method__init__
(self, data)
searches/binary_tree_traversal.py:11
Method__init__
The constructor of the search problem. x: the x coordinate of the current search state. y: the y coordinate of the current s
searches/hill_climbing.py:11
Method__init__
input: components or nothing simple constructor for init the vector
linear_algebra/src/lib.py:51
Method__init__
simple constructor for initializing the matrix with components.
linear_algebra/src/lib.py:265
Method__init__
(self, x: float, y: float)
maths/pi_monte_carlo_estimation.py:5
Method__init__
Initialize a six sided dice
maths/monte_carlo_dice.py:9
Method__init__
(self, poly_a=None, poly_b=None)
maths/radix2_fft.py:52
Method__init__
(self, real, rank)
maths/dual_number_automatic_differentiation.py:12
Method__init__
(self, x, y, z)
maths/pythagoras.py:7
Method__init__
(self, arg: list[list] | int)
maths/matrix_exponentiation.py:14
Method__init__
The coefficients should be in order of degree, from smallest to largest. >>> p = Polynomial(2, [1, 2, 3]) >>> p = Polynomial(
maths/polynomials/single_indeterminate_operations.py:16
Method__init__
The parameters "size" & "color" are not relevant for the simulation itself, they are only used for plotting.
physics/n_body_simulation.py:29
Method__init__
( self, bodies: list[Body], gravitation_constant: float = 1.0, time_factor
physics/n_body_simulation.py:121
Method__init__
( self, pos_x: int, pos_y: int, goal_x: int, goal_y: int, parent: Node | None )
graphs/bidirectional_breadth_first_search.py:25
Method__init__
(self, start: tuple[int, int], goal: tuple[int, int])
graphs/bidirectional_breadth_first_search.py:55
Method__init__
(self, start, goal)
graphs/bidirectional_breadth_first_search.py:125
Method__init__
Priority queue class constructor method. Examples: >>> priority_queue_test = PriorityQueue() >>> priority_queue_test
graphs/dijkstra_algorithm.py:13
Method__init__
Graph class constructor Examples: >>> graph_test = Graph(1) >>> graph_test.num_nodes 1 >>> graph_tes
graphs/dijkstra_algorithm.py:214
Method__init__
(self, data: T)
graphs/minimum_spanning_tree_kruskal2.py:10
Method__init__
(self)
graphs/minimum_spanning_tree_kruskal2.py:18
Method__init__
(self)
graphs/minimum_spanning_tree_kruskal2.py:50
Method__init__
(self)
graphs/minimum_spanning_tree_prims2.py:86
Method__init__
(self)
graphs/minimum_spanning_tree_prims2.py:196
Method__init__
(self)
graphs/minimum_spanning_tree_prims.py:6
Method__init__
Arguments: num_of_nodes - the number of nodes in the graph Attributes: m_num_of_nodes - the number of nodes i
graphs/boruvka.py:34
Method__init__
(self, name)
graphs/page_rank.py:19
Method__init__
(self, size: int)
graphs/breadth_first_search_zero_one_shortest_path.py:25
Method__init__
Parameters: directed: (bool) Indicates if graph is directed or undirected. Default is True.
graphs/graph_list.py:75
Method__init__
(self)
graphs/directed_and_undirected_weighted_graph.py:10
Method__init__
(self)
graphs/directed_and_undirected_weighted_graph.py:265
Method__init__
( self, pos_x: int, pos_y: int, goal_x: int, goal_y: int, g_co
graphs/greedy_best_first.py:56
Method__init__
( self, grid: list[list[int]], start: tuple[int, int], goal: tuple[int, int] )
graphs/greedy_best_first.py:107
Method__init__
(self, n)
graphs/dinic.py:5
Method__init__
(self)
graphs/depth_first_search_2.py:7
Method__init__
(self)
graphs/markov_chain.py:12
Method__init__
>>> graph = Graph(2) >>> graph.vertices 2 >>> len(graph.graph) 2 >>> len(graph.graph[0]) 2
graphs/dijkstra_alternate.py:5
Method__init__
(self)
graphs/minimum_spanning_tree_boruvka.py:6
Method__init__
(self)
graphs/minimum_spanning_tree_boruvka.py:106
Method__init__
(self)
graphs/breadth_first_search.py:11
Method__init__
Parameters: - vertices: (list[T]) The list of vertex names the client wants to pass in. Default is empty. - edges: (l
graphs/graph_adjacency_matrix.py:32
Method__init__
( self, pos_x: int, pos_y: int, goal_x: int, goal_y: int, g_co
graphs/bidirectional_a_star.py:44
Method__init__
(self, start: TPosition, goal: TPosition)
graphs/bidirectional_a_star.py:94
Method__init__
(self, start: TPosition, goal: TPosition)
graphs/bidirectional_a_star.py:184
Method__init__
Graph is implemented as dictionary of adjacency lists. Also, Source vertex have to be defined upon initialization.
graphs/breadth_first_search_shortest_path.py:19
Method__init__
(self, flow_network)
graphs/edmonds_karp_multiple_source_and_sink.py:61
Method__init__
(self, flow_network)
graphs/edmonds_karp_multiple_source_and_sink.py:82
Method__init__
(self, flow_network)
graphs/edmonds_karp_multiple_source_and_sink.py:95
Method__init__
(self)
graphs/multi_heuristic_astar.py:10
Method__init__
Parameters: - vertices: (list[T]) The list of vertex names the client wants to pass in. Default is empty. - edges: (
graphs/graph_adjacency_list.py:32
Method__init__
Arguments: id - input an id to identify the vertex Attributes: neighbors - a list of the vertices it is linke
graphs/prim.py:16
Method__init__
(self, x, y)
divide_and_conquer/convex_hull.py:48
Method__init__
(self, red=None, green=None, blue=None, red_edge=None, nir=None)
digital_image_processing/index_calculation.py:107
Method__init__
(self, img, dst_width: int, dst_height: int)
digital_image_processing/resize/resize.py:13
Method__init__
(self)
digital_image_processing/histogram_equalization/histogram_stretch.py:16
Method__init__
(self, input_img, threshold: int)
digital_image_processing/dithering/burkes.py:19
Method__init__
list_of_points: Control points in the xy plane on which to interpolate. These points control the behavior (shape) of the Bezier c
graphics/bezier_curve.py:15
Method__init__
(self, username)
web_programming/instagram_crawler.py:44
Method__init__
(self, content)
web_programming/test_fetch_github_info.py:10
Method__init__
(self, domain: str)
web_programming/emails_from_url.py:27
Method__init__
(self, array: list[int])
data_structures/arrays/prefix_sum.py:11
Method__init__
(self, data: Any)
data_structures/queues/linked_queue.py:10
Method__init__
(self)
data_structures/queues/linked_queue.py:45
← previousnext →2,401–2,500 of 3,909, ranked by callers