原创 非線性優化(梯度下降,高斯法)

文章目錄1. 什麼是非線性優化2. 問題舉例3. 通過迭代求解問題3.1 梯度下降法的優點3.2 梯度下降法的缺點3.3 牛頓法的優點:3.4 牛頓法的缺點:3.5 牛頓法求根公式與牛頓優化法之間的聯繫4. 總結 1. 什麼是非線

原创 C++ 運行期多態和編譯器多態

C++多態有多種實現方式,在面對對象編程時,採用的是運行期多態,也稱動態多態。在泛型編程中,多態基於模板的具現化與函數的重載解析,這種多態在編譯期進行,也稱編譯器多態或者靜態多態。 運行期多態 運行期多態歸根結底就是類繼承的一個特

原创 Resource Acquisition is Initialization (RAII)

Table of Contents1. Example of `Mutex_lock()`1.1 Bad Performance1.2 Good Performance2. Example of `std::share_ptr`

原创 高斯牛頓法和LM法

文章目錄1. 高斯牛頓法2. LM (Levenberg-Marquart) 法 以線性迴歸爲例,假設最佳函數爲 y=θTxy=\bold{\theta}^T\mathbf{x}y=θTx, 對於每對觀測結果(x(i),y(i))

原创 矩陣小知識

文章目錄0. 矩陣種類埃爾米特矩陣(Hermitian Matrix)酉矩陣 (Unitary Matrix)可對角化矩陣正規矩陣(Normal Matrix)正定矩陣1. LU 分解分解的條件2. 特徵分解 (Eigen Dec

原创 非線性優化

文章目錄1. 什麼是非線性優化2. 問題舉例3. 通過迭代求解問題4. 總結 1. 什麼是非線性優化 非線性優化的表達形式: min⁡xf(x) \min_x f(x) xmin​f(x) 當 f(x) 是一個非線性函數的時候,這

原创 STL Algorithms 01: Non-modifying Algorithms

文章目錄STL Algorithms 01: Non-modifying Algorithms1. 計數容器中某個元素重複的次數2. 得到容器中第一個最大值,最小值的位置3. 線性搜索 (針對未排序的容器,否則可以用 binary

原创 37. Sudoku Solver

37. Sudoku Solver Problem: Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution m

原创 模板

模板 1. 函數模板 (Function Templates) 假設我們有如下的函數模板 template <typename T> // this is the template parameter declaration co

原创 79. Word Search

79. Word Search Problem: Given a 2D board and a word, find if the word exists in the grid. The word can be construc

原创 Partial Differential Equations (PDEs)

Partial Differential Equations (PDEs) 12.1 PDEs (Defintion) of PDE A PDE is an equation involving one or more part

原创 Integrating Factor

文章目錄Integrating Factors Integrating Factors When we have an equation like (3xy+y2)+(x2+xy)y′=0 (3xy + y^2) + (x^2+x

原创 Covariance and Correlation

Covariance and Correlation Demystifying the terms Covariance indicates the direction of the linear relationship bet

原创 XML Tutorial

7. Describing Data with XML <BusinessCard> <name>Joe Marini</name> <phone type = "home">+1 (415) 555-1234</

原创 CHAP. 6 Laplace Transform

Table of Contents6.1 Laplace Transform(Def)ReferencesFormula TableProperties(Ex01) 常數方程(Ex02) 指數方程(Ex03) 整數次多項式(Ex0