ADD: added other eigen lib
This commit is contained in:
@@ -19,16 +19,13 @@ if(QT4_FOUND)
|
||||
add_dependencies(all_examples Tutorial_sparse_example)
|
||||
endif()
|
||||
|
||||
if(EIGEN_COMPILER_SUPPORT_CPP11)
|
||||
add_executable(random_cpp11 random_cpp11.cpp)
|
||||
target_link_libraries(random_cpp11 ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
||||
add_dependencies(all_examples random_cpp11)
|
||||
ei_add_target_property(random_cpp11 COMPILE_FLAGS "-std=c++11")
|
||||
add_executable(random_cpp11 random_cpp11.cpp)
|
||||
target_link_libraries(random_cpp11 ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
||||
add_dependencies(all_examples random_cpp11)
|
||||
|
||||
add_custom_command(
|
||||
TARGET random_cpp11
|
||||
POST_BUILD
|
||||
COMMAND random_cpp11
|
||||
ARGS >${CMAKE_CURRENT_BINARY_DIR}/random_cpp11.out
|
||||
)
|
||||
endif()
|
||||
add_custom_command(
|
||||
TARGET random_cpp11
|
||||
POST_BUILD
|
||||
COMMAND random_cpp11
|
||||
ARGS >${CMAKE_CURRENT_BINARY_DIR}/random_cpp11.out
|
||||
)
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
|
||||
using namespace Eigen;
|
||||
|
||||
int main() {
|
||||
std::default_random_engine generator;
|
||||
std::poisson_distribution<int> distribution(4.1);
|
||||
auto poisson = [&] () {return distribution(generator);};
|
||||
|
||||
RowVectorXi v = RowVectorXi::NullaryExpr(10, poisson );
|
||||
Eigen::RowVectorXi v = Eigen::RowVectorXi::NullaryExpr(10, poisson );
|
||||
std::cout << v << "\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user