gtsam
3rdparty
Eigen
doc
special_examples
random_cpp11.cpp
Go to the documentation of this file.
1
#include <Eigen/Core>
2
#include <iostream>
3
#include <random>
4
5
using namespace
Eigen
;
6
7
int
main
() {
8
std::default_random_engine generator;
9
std::poisson_distribution<int> distribution(4.1);
10
auto
poisson = [&] () {
return
distribution(generator);};
11
12
RowVectorXi
v
= RowVectorXi::NullaryExpr(10, poisson );
13
std::cout <<
v
<<
"\n"
;
14
}
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
v
Array< int, Dynamic, 1 > v
Definition:
Array_initializer_list_vector_cxx11.cpp:1
main
int main()
Definition:
random_cpp11.cpp:7
gtsam
Author(s):
autogenerated on Thu Nov 28 2024 04:04:33