C language implementation of basic search algorithm

1. Sequential search Sequential search is the basic search algorithm for traversing and comparing the array / linked list according to the original sequence. 1.1 algorithm implementation Start with the last data element in the table and compare with the key of the record one by oneIf the matching is successful, the search is successful; Conv ...

Posted by Aldark on Wed, 05 Jan 2022 10:47:34 +0100

Two dimensional convex hull problem

Preparatory knowledge Cross product 1. Introduction of concept In order to measure the inclination of a straight line in the plane, we introduce the concept of inclination angle. By establishing tan in rectangular coordinate system α = k. We have realized the connection between geometric relations and algebraic relations, which is ...

Posted by djwiltsh on Wed, 05 Jan 2022 10:46:21 +0100

[Matlab traffic sign recognition] BP neural network traffic sign recognition (with panel) [including GUI source code phase 1647]

1, Introduction of BP neural network traffic sign recognition Road traffic signs are used to prohibit, warn, instruct and restrict road users to use roads in an orderly manner to ensure travel safety If the road traffic signs can be recognized automatically, the occurrence of road traffic accidents will be greatly reduced However, due to the c ...

Posted by jeff21 on Wed, 05 Jan 2022 10:36:08 +0100

Machine learning algorithm series - Pocket Algorithm

Background knowledge required for reading this article: perceptron learning algorithm and yidui programming knowledge1, Introduction   in the previous section, we learned the machine learning algorithm series (I) - perceptron learning algorithm (PLA), which can perfectly divide the data set into two types, but one prerequisite is that ...

Posted by wild_dog on Wed, 05 Jan 2022 10:08:52 +0100

(OpenCV) image algorithm notes (Part 1)

1. opecv reading and displaying images Reading and displaying images is the simplest and most basic operation in opencv. Although it can be implemented using only two simple API s, there are some small details that should be paid attention to` #include<opencv2/opencv.hpp> using namespace std; using namespace cv; int main() { Mat s ...

Posted by clearstatcache on Wed, 05 Jan 2022 09:40:52 +0100

Go language Bible - Chapter 7 interface - 7.6 sort Interface interface

Chapter 7 interface Interface types are abstractions and generalizations of other types of behavior Interface types will not be bound with specific implementation details. This abstract way can make our functions more flexible and adaptable The interface of Go language is special because it meets the implicit implementation. In other words, w ...

Posted by Exoon on Wed, 05 Jan 2022 08:49:05 +0100

Elegant violence - Introduction to sequence blocking

summary Interval problems are generally very flexible and can be solved by segment tree, although the time complexity can be achieved O ( l o g ( ...

Posted by loquela on Wed, 05 Jan 2022 05:48:59 +0100

Prim algorithm, minimum spanning tree of graph, c/c + + description

The spanning tree of   graph is the minimum connected subgraph of graph, which contains all vertices in the graph, but only the number of edges 1 less than the number of vertices. No matter how small the number of edges is, it will not be connected. If there is one more edge, there will be multiple paths between vertices. The tree with the ...

Posted by xhitandrun on Tue, 04 Jan 2022 23:13:09 +0100

Data structure and algorithm [Python implementation] search and basic sorting

1, Hanoi Tower problem def hanoi(n,a,b,c): #Move from a through b to c if n>0: hanoi(n-1,a,c,b) #Move from a through b to c print("disc%d moving from %s to %s" %(n,a,c)) hanoi(n-1,b,a,c) #Move from b through a to c hanoi(2,'A','B','C') The recurrence formula h(x)=2h(x-1)+1 is about equal to the nth power of 2 ...

Posted by kidsleep on Tue, 04 Jan 2022 18:53:04 +0100

Code implementation of calculating the similarity between tensor s according to Euclidean distance and cosine similarity

Generally, in the process of model reasoning on the end side, the quantized data is used to participate in the calculation of each layer, rather than the original float data type. The usual quantized data types include UINT8/INT8/INT16, etc. due to the difference of data representation range, the accuracy loss must be involved in the quantizati ...

Posted by lihman on Tue, 04 Jan 2022 17:23:25 +0100