関数subtract_diagonal_matrix マニュアル

(The documentation of function subtract_diagonal_matrix)

Last Update: 2021/12/6


◆機能・用途(Purpose)

2つの対角行列の差を計算する。
Calculate the difference of two diagonal matrices.


◆形式(Format)

#include <matrix/operation.h>
inline struct diagonal_matrix subtract_diagonal_matrix
(const struct diagonal_matrix A,const struct diagonal_matrix B)


◆引数(Arguments)

A 差の計算に用いる1つ目の対角行列\(\myvector{A}\)。
The first diagonal matrix \(\myvector{A}\) used in the subtraction.
B 差の計算に用いる2つ目の対角行列\(\myvector{B}\)。 サイズは\(\myvector{A}\)と等しくなければならない。
The second diagonal matrix \(\myvector{B}\) used in the subtraction, which must have the same size as \(\myvector{A}\).


◆戻り値(Return value)

対角行列\(\myvector{A}-\myvector{B}\)を表す構造体。 戻り値のメンバの値は以下のようになる。
A structure which represents a diagonal matrix \(\myvector{A}-\myvector{B}\). The values of members of the return value are as follows.

戻り値のメンバ
Member of the return value
値
Value
rowmax A.rowmax
columnmax A.columnmax
size A.rowmaxとA.columnmaxのうちの小さい方。
Smaller one of A.rowmax and A.columnmax.
rank A.rankとB.rankのうちの大きい方。
Larger one of A.rank and B.rank.
各\(i\)に対するmain[i]
main[i] for each \(i\)
A.main[i]\(-\)B.main[i]
allocated ’y’


◆使用例(Example)

struct diagonal_matrix A,B;
struct diagonal_matrix C=subtract_diagonal_matrix(A,B);