Real and complex matrices and their various operations implemented in C language

I. Introduction I recently worked as an intern in a company and spent three weeks working on an indoor positioning algorithm (rudimentary, not yet optimized) to realize the joint writing and debugging of matlab and C. The author believes that the difficulty lies in the various operations of the matrix. In C++ There is Eigen library available. E ...

Posted by manchuwok on Sun, 22 May 2022 14:49:52 +0300

Detailed explanation of monotonicity of decision-making

Necessary and sufficient conditions for monotonicity of decision making For two decision points, if at I, the large decision point is better than the small decision point, then at [i+1,n], the large decision point is better than the small decision point When proving, there is no need for mathematical proof, and it is enough to prove that the ...

Posted by Geof on Sun, 22 May 2022 09:04:14 +0300

Java sort Bubble

Bubble sorting 1. What is Bubble sorting? Bubble Sort is the most basic exchange sort. The reason why it is called bubble sorting is that each element can be sorted bit by bit according to its own size like a small bubble array Move to one side of the. Principle of bubble sorting: Only one number can be determined to be returned in each tr ...

Posted by iarp on Sun, 22 May 2022 02:48:53 +0300

Improvement of binary tree traversal algorithm (non recursive implementation)

Improvement of binary tree traversal algorithm The depth first traversal algorithms of binary tree are implemented by recursive functions, which is very inefficient. The reason is that the system calls a stack and does complex operations such as protecting the site and restoring the site, so that the traversal can be realized by very simple cod ...

Posted by Verrou on Sun, 22 May 2022 02:06:38 +0300

A brief talk on irrotational Treap (based on the balanced tree of literature and art of Luogu P3391)

Let's talk about it. It's really shallow. It's completely based on the following inscription ↓ Luogu P3391 Look at the questions myself. I'm too lazy to stick... analysis In fact, there is nothing to analyze. This is a template problem of Splay tree, which solves the interval maintenance problem that can not be solved by general Treap. ...

Posted by springo on Sun, 22 May 2022 00:51:18 +0300

Simulated annealing algorithm (code)

In practical daily life, people often encounter the following problems: in a given domainInside, find the functionCorresponding optimal value. Here, the minimum value problem is taken as an example (the maximum value problem can be equivalent to the minimum value problem), which is formalized as: IfIf it is a discrete finite value, the optim ...

Posted by mdaoust on Sat, 21 May 2022 21:37:49 +0300

Check if a point is inside a polygon

How to tell if a point is inside a polygon? (1) Area sum discrimination method: determine whether the area sum of the triangle formed by the target point and each side of the polygon is equal to the polygon, and if it is equal, it is inside the polygon. (2) Angle sum discrimination method: judge whether the sum of the angle between the target p ...

Posted by franko75 on Sat, 21 May 2022 21:28:54 +0300

JAVA data structure and algorithm -- single chain surface test questions (Sina, Baidu, Tencent)

Common interview questions of single linked list Find the number of effective nodes in the single linked list Find the penultimate node in the single lin k ed list (Sina) Reversal of single linked list (Tencent) Print the single linked list from end to end (Baidu requires mode 1: reverse traversal. Mode 2: stack stack) Example 1: find the ...

Posted by lin on Sat, 21 May 2022 17:37:32 +0300

Big data Hadoop learning -- page ranking PageRank algorithm

1, Algorithm description PageRank is web page ranking, also known as page ranking (SOCIAL). Some basic concepts: 1. Web page entering the chain: that is, voting. Hyperlinks to other web pages in the web page are used as other web pages entering the chain, which is equivalent to voting for other web pages; 2. Number of links: if a web page ob ...

Posted by mblack0508 on Sat, 21 May 2022 16:13:37 +0300

[Blue Bridge Cup] 2017 Preliminary Round Jumping Grasshopper

Topic description As shown: There are 9 plates arranged in a circle. Eight of the plates contained eight grasshoppers, and one was empty. We number these grasshoppers clockwise from 1 to 8. Each grasshopper can jump into an adjacent empty plate, or with a little more force, jump over an adjacent grasshopper into an empty plate. Please calculat ...

Posted by geon on Sat, 21 May 2022 05:47:10 +0300