関数diagonal_matrix_cpy マニュアル

(The documentation of function diagonal_matrix_cpy)

Last Update: 2021/12/6


◆機能・用途(Purpose)

対角行列をコピーする。
Copy a diagonal matrix.


◆形式(Format)

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


◆引数(Arguments)

A コピー元の対角行列。
The original diagonal matrix to be copied.


◆戻り値(Return value)

メンバmainの配列のアドレスを除く全メンバの値がAと完全に同じ構造体。 戻り値のメンバの値は以下のようになる。
A structure which has members with exactly the same values as those of A except for the array address of member main. 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のうちの小さい方。 1
Smaller one of A.rowmax and A.columnmax. 1
rank A.rank
各\(i\)に対するmain[i]
main[i] for each \(i\)
A.main[i]
allocated ’y’ 1

  1. Aのメンバの直接的なコピーにはなっていないが、 Aがymaeda_opentools内の関数を用いて作成したものである限り、 Aのメンバの値と一致するはずである。
    Although this is not the direct copy of the corresponding member of A, the values should be equal as long as A was created using any function in ymaeda_opentools.


◆使用例(Example)

struct diagonal_matrix A;
struct diagonal_matrix B=diagonal_matrix_cpy(A);