2010-04-06から1日間の記事一覧

分散 variance

結構前に作ったんですが、STL となるべく互換性を持たせて作った分散を求める関数。内容も短いしイテレータさえあれば使えるので便利かも? #include <cmath> #include <iterator> #include <numeric> /*! variance between iterators 'b' and 'e' with average 'a'. */ template <typename V, typename InItr> inli</typename></numeric></iterator></cmath>…