- Game Physics Cookbook
- Gabor Szauer
- 184字
- 2021-04-02 20:27:29
Adjugate matrix
The adjugate of any order matrix is the transpose of its cofactor matrix. The adjugate is sometimes referred to as adjoint:

Getting ready
We already know how to take the cofactor of a matrix and how to transpose the matrix. Implementing the adjugate function is as easy as calling our existing cofactor and transpose functions.
How to do it…
Follow these steps to implement functions which return the adjugate matrix of two, three and four dimensional square matrices:
- Add the declaration for adjugate for all three matrices to
matrices.h
:mat2 Adjugate(const mat2& mat); mat3 Adjugate(const mat3& mat); mat4 Adjugate(const mat4& mat);
- Implement all three of the adjugate functions in
matrices.cpp
:mat2 Adjugate(const mat2& mat) { return Transpose(Cofactor(mat)); } mat3 Adjugate(const mat3& mat) { return Transpose(Cofactor(mat)); } mat4 Adjugate(const mat4& mat) { return Transpose(Cofactor(mat)); }
How it works…
The adjugate matrix utilizes two functions, which we already covered earlier: the transpose function, which swaps a matrices rows with its columns, and the cofactor function. Recall that the cofactor of element i, j is the minor of the element multiplied by .
推薦閱讀
- 移動UI設(shè)計(jì)(微課版)
- C#程序設(shè)計(jì)(慕課版)
- INSTANT MinGW Starter
- Java Web應(yīng)用開發(fā)技術(shù)與案例教程(第2版)
- 精通Scrapy網(wǎng)絡(luò)爬蟲
- Learning Data Mining with R
- Learning Three.js:The JavaScript 3D Library for WebGL
- MATLAB 2020從入門到精通
- Java實(shí)戰(zhàn)(第2版)
- Python計(jì)算機(jī)視覺和自然語言處理
- Node.js從入門到精通
- WCF技術(shù)剖析(卷1)
- C Primer Plus(第6版)中文版【最新修訂版】
- Learning Redux
- Python自動化運(yùn)維:技術(shù)與最佳實(shí)踐