COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/DenseBase_LinSpacedInt.cpp

9 lines
420 B
C++
Raw Permalink Normal View History

2024-10-21 16:42:03 -04:00
cout << "Even spacing inputs:" << endl;
cout << VectorXi::LinSpaced(8,1,4).transpose() << endl;
cout << VectorXi::LinSpaced(8,1,8).transpose() << endl;
cout << VectorXi::LinSpaced(8,1,15).transpose() << endl;
cout << "Uneven spacing inputs:" << endl;
cout << VectorXi::LinSpaced(8,1,7).transpose() << endl;
cout << VectorXi::LinSpaced(8,1,9).transpose() << endl;
cout << VectorXi::LinSpaced(8,1,16).transpose() << endl;