boost
http://www.kab-studio.biz/Programing/Codian/STL/02.html ブーストで文字列をカンマで分割 #include <iostream> #include <vector> #include <boost/algorithm/string.hpp> using namespace std; int main(){ string str="abc,efg,hij"; vector<string> v; boost::algorithm::split(v,str,boost::is_any_of(","));</string></boost/algorithm/string.hpp></vector></iostream>…
boostで対数正規分布乱数の発生。 g++ test.cpp -L/usr/include/boost/random test.cpp #include<boost/random.hpp> #include<stdio.h> #include<stdlib.h> #include<iostream> int main(){ using namespace std; using namespace boost; mt19937 gen(1); lognormal_distribution<> dst(1,1); //normal_distr</iostream></stdlib.h></stdio.h></boost/random.hpp>…