G2O Library: the basic use of graph optimization library, taking curve fitting (univariate edge problem) as an example
Introduction to g2o Library
g2o(General Graphic Optimization,
G
2
O
G^2O
G2O) is an open source C + + framework for solving nonlinear least squares problems based on graph optimization.
Github ...
Added by phpbeginner on Fri, 25 Feb 2022 18:51:30 +0200
Neural network topology sorting
Artificial Neural Network is a new computing system with self-learning ability. It is widely used in many fields, such as pattern recognition, function approximation and loan risk assessment. The research on neural network has always been a hot direction today. After self-learning an introductory book on neural network, Lan Lan proposed a simpl ...
Added by mrmitch on Fri, 25 Feb 2022 17:36:10 +0200
Smart pointer small parsing
Smart pointer
This section provides a rough understanding of smart pointers in the C + + standard library.
Why is there a smart pointer?
The existence of smart pointers has two advantages, all for one reason - it can automatically release the memory it points to.
First of all, programmers do not have to manage every pointer defined b ...
Added by oeb on Fri, 25 Feb 2022 17:14:21 +0200
C + + exception handling mechanism from simple to deep, and the bottom analysis of function call assembly process Bottom layer simulation of C++11 intelligent pointer
I abnormal
1.1. Programming model and basic usage of exceptions
Let's use it to explain the above model
double Div(int a, int b) {
if (b == 0) throw "Zero Div";//Throw a string constant
cout << "If an exception is thrown, Cut yourself and all at once, Will not execute" << endl;
return (double)a / (double)b;
}
int main() {
...
Added by ChrisBoden on Fri, 25 Feb 2022 15:50:17 +0200
C + + learning notes
catalogue
I What is operator overloading
II How operators are overloaded
1. Friend overload
2. Class member function overloading
III Special operator overloading
1. Stream operator
2. Self increasing and self decreasing operator overloading and text overloading
(1) Self increasing and self decreasing
(2) Text overload
(3) Implicit con ...
Added by xinnex on Fri, 25 Feb 2022 15:06:01 +0200
Design mode_ 23 visitor mode
23 visitor mode
23.1 concept
Encapsulates some operations that act on each element in a data structure. New operations that act on these elements can be defined without changing the data structure.
23.2 structure
Abstract visitor role: defines the behavior of accessing each element. Its parameters are the accessible elements. Theoretica ...
Added by Perry Mason on Fri, 25 Feb 2022 12:43:55 +0200
Simple greedy strategy
Greed and proof
To choose the greedy strategy, we must first prove that the greedy strategy is correct before we can consider using it. In many cases, the rationality of greed is not obvious, but if we can find a counterexample, it can prove that such greed is not correct.
Fractional Knapsack Problem
Fractional Knapsack Problem When the it ...
Added by alex_lana on Fri, 25 Feb 2022 06:48:11 +0200
Design mode_ 21 intermediary model
21 intermediary model
21.1 concept
Define a mediation role to encapsulate the interaction between a series of objects, so that the coupling between the original objects is loose, and the interaction between them can be changed independently. Multiple classes are interrelated, showing a complex network structure and over coupling. The medi ...
Added by summoner on Thu, 24 Feb 2022 17:00:14 +0200
LeetCode 1706. Where does the ball meet? Multiple solutions to one problem
1706. Where does the ball meet Problem solution
Title Source: 1706. Where does the ball meet
2022.02.24 one question per day
Daily question column address: LeetCode daily problem solution is being updated ❤️💕
Today's topic is easier. After solving the problem, I'll pack my bags and go back to school tomorrow. I hope it's easy tomorrow, heh ...
Added by fredcool on Thu, 24 Feb 2022 12:28:42 +0200
Adjacency matrix implementation based on C++
Adjacency matrix (note the directed adjacency matrix graph implemented here)
The adjacency matrix of a graph is stored in two arrays. A one-dimensional array stores the vertex information in the graph, and a two-dimensional array (adjacency matrix) stores the edge or arc information in the graph. Let graph G have n vertices, then the adjacency ...
Added by smartknightinc on Thu, 24 Feb 2022 12:17:08 +0200