コード例 #1
0
ファイル: main.cpp プロジェクト: mz2/peer
void playing()
{

    // insert code here...
    PMatrix m(2,2);
    PVector v1,v2;
    v1 = PVector::Constant(3, 2.1);
    v2 = PVector::Constant(3, 1.3);
    v1 = v2;
    v2(1) = 3;
    std::cout << PMatrix::Ones(3,4)*1.2 << std::endl;
    std::cout << v1 << std::endl << v2 + PVector::Ones(3)*2.0 << std::endl;
    m(0,0) = 3;
    m(1,0) = 2.5;
    m(0,1) = -1;
    m(1,1) = m(1,0) + m(0,1);
    std::cout << m << std::endl << m.rowwise().sum() << std::endl << m.colwise().sum() << std::endl;
    std::cout << randomreal() << std::endl << psi(10) << std::endl << gammafunction(10) << std::endl;

}