関数diagonal_matrix_times_matrix マニュアル

(The documentation of function diagonal_matrix_times_matrix)

Last Update: 2021/12/6


◆機能・用途(Purpose)

対角行列と行列の積を計算する。
Calculate the product of a diagonal matrix and a matrix.


◆形式(Format)

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


◆引数(Arguments)

Lambda 積の計算に用いる対角行列\(\myvector{\Lambda}\)。
A diagonal matrix \(\myvector{\Lambda}\) used in the calculation of the product.
B 積の計算に用いる行列\(\myvector{B}\)。 行数は\(\myvector{\Lambda}\)の列数と等しくなければならない。
A 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{\Lambda}\).


◆戻り値(Return value)

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

戻り値のメンバ
Member of the return value

Value
rowmax Lambda.rowmax
columnmax B.columnmax
各\(i\), \(j\)に対するmain[i][j]
main[i][j] for each \(i\) and \(j\)
Lambda.main[i]∗B.main[i][j]
allocated ’y’


◆使用例(Example)

struct diagonal_matrix Lambda;
struct matrix B;
struct matrix C=diagonal_matrix_times_matrix(Lambda,B);