This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <Eigen/Dense> | |
using Eigen::MatrixXd; // m by n double matrix | |
int main() | |
{ | |
// Example from Eigen3 doc | |
MatrixXd m(2,2); | |
// Comma initialization, row major order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <memory> | |
typedef std::vector<std::string> str_vec; | |
void print(str_vec const list) | |
{ | |
for ( auto el : list ) std::cout << el << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for( arg <- args ) println( arg ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <string> | |
int main(int argc, char* argv[]) | |
{ | |
std::vector<std::string> args(argc); | |
args.assign( argv, argv+argc); | |
for( const auto arg : args ) std::cout << arg << std::endl; |
NewerOlder