Created
December 3, 2019 14:40
-
-
Save kris-singh/fd13f1d3a5dfa4a575aaaad034efed39 to your computer and use it in GitHub Desktop.
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
# Path of eigen checked out from devlopement branch | |
cmake_minimum_required(VERSION 3.4) | |
project(Test) | |
set(CMAKE_CXX_FLAGS "-std=c++11") | |
include_directories(/Users/kris/Desktop/kmean/eigen-git-mirror) | |
add_executable(main eigen_example.cpp) | |
#include <algorithm> | |
#include <cmath> | |
#include <vector> | |
#include <iostream> | |
#include <Eigen/Core> | |
#include <Eigen/Dense> | |
using namespace std; | |
using namespace Eigen; | |
int main(){ | |
MatrixXf mat = MatrixXf::Random(3, 4); | |
cout << mat(all, {2}) << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment