t-sakashita / rokko

Integrated Interface for libraries of eigenvalue decomposition
Boost Software License 1.0
10 stars 2 forks source link

使用できるベクトルのクラスを一般化 #568

Open t-sakashita opened 4 years ago

t-sakashita commented 4 years ago

Rokkoでは、固有値の格納等のベクトルをテンプレートで指定するので、様々なクラスが使える。

ベクトルには、以下のメンバ関数があれば良い。

以下のように、一般の関数テンプレートを定義できることになる。

template<class C>
auto storage(C& mat) {
  return mat.data();
}