関数matrix_times_diagonal_matrix マニュアル

(The documentation of function matrix_times_diagonal_matrix)

Last Update: 2021/12/6


◆機能・用途(Purpose)

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


◆形式(Format)

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


◆引数(Arguments)

A 積の計算に用いる行列\(\myvector{A}\)。
A matrix \(\myvector{A}\) used in the calculation of the product.
Lambda 積の計算に用いる対角行列\(\myvector{\Lambda}\)。 行数は\(\myvector{A}\)の列数と等しくなければならない。
A diagonal matrix \(\myvector{\Lambda}\) used in the calculation of the product. The number of rows of \(\myvector{\Lambda}\) must be equal to the number of columns of \(\myvector{A}\).


◆戻り値(Return value)

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

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

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


◆使用例(Example)

struct matrix A;
struct diagonal_matrix Lambda;
struct matrix C=matrix_times_diagonal_matrix(A,Lambda);