2012-05-20から1日間の記事一覧

連立一次方程式で遊ぶ

はじめに 連立一次方程式(Ax=b)を直接法(ガウスジョルダン法)、反復法(最急降下法、共役勾配法)でちょっと解いてみた。 コード #include <algorithm> #include <cmath> #include <iostream> #include <vector> static const double EPS = 1e-8; typedef std::vector<double> vec; //ベクトル typedef std:</double></vector></iostream></cmath></algorithm>…