関数multiply_diagonal_matrix マニュアル

(The documentation of function multiply_diagonal_matrix)

Last Update: 2021/12/6


◆機能・用途(Purpose)

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


◆形式(Format)

#include <matrix/operation.h>
inline struct diagonal_matrix multiply_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 calculation of the product.
B 積の計算に用いる2つ目の対角行列\(\myvector{B}\)。 行数は\(\myvector{A}\)の列数と等しくなければならない。
The second diagonal matrix \(\myvector{B}\) used in the calculation of the product. The number of rows of \(\myvector{B}\) must be equal to the number of columns of \(\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 B.columnmax
size A.rowmaxとB.columnmaxのうちの小さい方。
Smaller one of A.rowmax and B.columnmax.
rank A.rankとB.rankのうちの小さい方。
Smaller 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=multiply_diagonal_matrix(A,B);