行列ライブラリ

自分用の 行列ライブラリ のメモです. 依存関係 AO.cc (Algebra Operations) に依存する. 型 要素の型を T として,Matrix<T> が,行列の型になる. (実装上,これは,Mat<AO_def<T>> として定義されているが,使うときは気にしなくて良い) 以下,要素の型を T とし,MyMat = Matrix<T> と定義されているものとする. mat は MyMat 型とする. 構築子 MyMat(int dimI_, int dimJ_) … dimI_ 行 dimJ_ 列 の零行列 MyMat(int dimI_, int dimJ_, T t) … dimI_ 行 dimJ_ 列 の,要素の値がすべて t である行列 MyMat(int dimI_, int dimJ_, const vector<T>& vec) … dimI_ 行,dimJ_ 列で,内部表現が vec である行列. 内部表現は,$a_{00}, a_{01}, \dots, a_{10}, a_{11}, \dots a_{mn}$ の順に並べた1次元 vector....

2024-03-30&nbsp;·&nbsp;yamate11