関数matrix_cpy マニュアル

(The documentation of function matrix_cpy)

Last Update: 2021/12/6


◆機能・用途(Purpose)

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


◆形式(Format)

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


◆引数(Arguments)

A コピー元の行列。
The original 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
各\(i\), \(j\)に対するmain[i][j]
main[i][j] for each \(i\) and \(j\)
A.main[i][j]
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 matrix A;
struct matrix B=matrix_cpy(A);