sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
be7bfa6109326a0a8ab0bfef78be99ef962e67ec0bc1fa207eaf320af8414727
C++
107
4
#ifdef ENABLE_GPU #error "The file nnpooling.cu should be compiled instead" #endif #include "nnpooling.cu"
2f6a2be26d77100c97fe8c7c128d1d69bde9489a355ca566014ac3843a802427
C++
109
5
Array3d v(1,2,3); v(1) *= 0.0/0.0; v(2) /= 0.0; cout << v << endl << endl; cout << isfinite(v) << endl;
5896ae8eae6de123aaae42dc123e641a6be4e8b553fec4bfcbbd203f1fc34845
C++
109
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/normal.hpp> int main() { int Error(0); return Error; }
945198fc90622f6ea389f746b21ccc5cd870b8a6e0913b281982ed31e4d62c93
C++
109
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "datamex.cu"
e8959dc2cc58ed12ddb1a2c447c8d5958ca0c0f6d5d56bf8c45265d7fc7d92e2
C++
109
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/extend.hpp> int main() { int Error(0); return Error; }
a43a2625f2cec83178e974f5b09802ee95c0acd9ad996c9576d8b21af9015597
C++
110
5
Array3d v(1,2,3); v(1) *= 0.0/0.0; v(2) /= 0.0; cout << v << endl << endl; cout << !isfinite(v) << endl;
ed06938ec800b98bcce5107e82a0313cda8cbc457db1ce7beca607eb67106355
C++
110
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_tmove.cu"
520c0d8af16148d9cf36445c5d373083611a62f783582596b8fe89799c6bdace
C++
111
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnpool.cu"
abf5af8e3d90c0c0ec59fa4cd15cc7ce6f67a0d7f220d44e305f622a79e8b4a1
C++
111
4
#ifdef ENABLE_GPU #error "The file nnnormalize.cu should be compiled instead" #endif #include "nnnormalize.cu"
e3f2c75a14907d75ffb65987ba1a93cc7dfc6004b07ffdc0cc16d2a2ee712a9f
C++
111
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnconv.cu"
3ce8ea304b3ff2dc4b1eae180e92d41257db65cfbef72bc572fa85e87211653e
C++
112
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnbnorm.cu"
4ead7041a81c6a5299aa557e92b132a3f33fffbc9f51fab0f6cb3b3caf1ed695
C++
112
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnconvt.cu"
71bd4f514315009ddca49536b88e431d762f6dd0316c03e7749d9d33db0388c4
C++
112
5
#ifdef ENABLE_GPU #error "The file nnsubsample.cu should be compiled instead" #endif #include "nnsubsample.cu"
b2c651581a0ce94877ffb78354092c0c1c1206320fee1a0e01e7a1a84d3e9619
C++
112
11
#define GLM_FORCE_UNRESTRICTED_GENTYPE #include <glm/glm.hpp> int main() { int Error = 0; return Error; }
6e7de0d1afd4c3bbc917f417836832cbed76f25c8dcc6fa52f2eb81bd17ac9c7
C++
113
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_cudatool.cu"
adde6923b27adafe5da466aa2c014817f568b96c977bf4d205e7af1965cf6c56
C++
113
4
#ifdef ENABLE_GPU #error "The file nnroipooling.cu should be compiled instead" #endif #include "nnroipooling.cu"
be021178cb8ef3835af5dcb663895207d6b62c35f0499efd42b22c9374ea2fbe
C++
113
4
#ifdef ENABLE_GPU #error "The file nnbnorm.cu should be compiled instead" #endif #include "nnbilinearsampler.cu"
f8604cd37aaae8af7a69a7246242388a4782c6f8fd6c1aabd834687027abfd1a
C++
113
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/projection.hpp> int main() { int Error(0); return Error; }
1bb61388b474228fa4171b3a5ed5177a8f29ba53ae02dcc2a5a59f5ea6819ca7
C++
114
3
MatrixXd m(3,4); m.resize(NoChange, 5); cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;
1fc11a923e6a68866c742d77fbaccb4e38f7e567571dec28012d1e414954c522
C++
114
3
MatrixXd m(3,4); m.resize(5, NoChange); cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;
30c77fd1678002edd329c4b7d31c77c5ef77c28f4afdbdde78655e275772f146
C++
114
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnroipool.cu"
6bb59a1ebecdc64b46beca45a5b6a77d5e71485e0ae3d5c869d942500657b3e0
C++
114
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/optimum_pow.hpp> int main() { int Error(0); return Error; }
790d6867473d57b871c8927c64a555bc9a154dc981613d31f0172fbcc7dc7d46
C++
114
5
MatrixXf A(2,2), B(3,2); B << 2, 0, 0, 3, 1, 1; A << 2, 0, 0, -2; A = (B * A).eval().cwiseAbs(); cout << A;
9c0c77f0122bea2d774bfb5f6c9eff6bb2e0451ab7484266df6f1ea56534b6e7
C++
114
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_taccummex.cu"
bbd6d1dd3c1466f52d841a1fc29457c433d8bf2cfaa1753fa42e9bac476c5937
C++
115
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_imreadjpeg.cu"
5aa4f79c66bb942558e7221ad0eba525adcc14090751b448da20cf1157aac58c
C++
116
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/closest_point.hpp> int main() { int Error(0); return Error; }
c4d3a9d09917a0f0d2232c82ab1d3214df792c8e080994abeeaca04909d57077
C++
116
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnnormalize.cu"
ccc8d7c72d75d6eebe13f7e7456e241934e8e3d8a6d6aaf228c6ba3471975e03
C++
116
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/normalize_dot.hpp> int main() { int Error(0); return Error; }
f7250bbecea01bea9a69cea9209dc7d5fa70e2fbf66b7b52550697346c6604f1
C++
116
5
#ifdef ENABLE_GPU #error "The file nnnormalizelp.cu should be compiled instead" #endif #include "nnnormalizelp.cu"
f9305fcc44abf7cac120b6d6c097e1835d7cf8f3e4a274cf356b59e6859ef81d
C++
116
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/perpendicular.hpp> int main() { int Error(0); return Error; }
98c5a25f94ddc6745fe87e60035033bcbe5a44fccd498a7108f61ff1e2f651ba
C++
117
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/orthonormalize.hpp> int main() { int Error(0); return Error; }
c2bf624df19c54851ff13fc24bed1af183ff7b8a4a194e489bd439f3e97f0b15
C++
117
11
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/vec_swizzle.hpp> int main() { int Error = 0; return Error; }
19c9081a30e86831d017f159e78d1621d5733545f519a03ad2cb6f70ea9fa0f3
C++
118
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnnormalizelp.cu"
c90768d2e47935649b75f90e46290b585f3038ff8f80bc31da9ff3b527b32a68
C++
118
10
#define GLM_FORCE_CXX98 #include <glm/glm.hpp> #include <glm/ext.hpp> int main() { int Error = 0; return Error; }
f240575b2331757bed13fe39cd7488a37c2e808e12dbecc1604625c9a7c15e4e
C++
118
5
Matrix3f m; m.row(0) << 1, 2, 3; m.block(1,0,2,2) << 4, 5, 7, 8; m.col(2).tail(2) << 6, 9; std::cout << m;
476e16ae1760819c32ab8c5794aa7f620f5b430a94bd49100faaeae413ffb3c9
C++
119
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/number_precision.hpp> int main() { int Error(0); return Error; }
630ee606be144a158833da9fe9bf1862f1c6f04284daa7c39d8b80f888ba6f5d
C++
119
2
cout << VectorXi::LinSpaced(4,7,10).transpose() << endl; cout << VectorXd::LinSpaced(5,0.0,1.0).transpose() << endl;
6beda241f7f84a25565689fe74c3375a6aae0188617712d62392f05bdf8f54f2
C++
119
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/extended_min_max.hpp> int main() { int Error(0); return Error; }
e1fc3fa2d61b2df177b0d29efd6043bbf325e55d4519912c2b36110fa8111932
C++
119
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/fast_exponential.hpp> int main() { int Error(0); return Error; }
e5f06b062e9439d8dc250390c416319fa860b99b10449eafea124eee705b9263
C++
119
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/matrix_operation.hpp> int main() { int Error(0); return Error; }
bb8bfd818180a37f7b8bdc5c76ec2ce33ce4e3d38239a47f013b519a19c7ae20
C++
120
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/color_space_YCoCg.hpp> int main() { int Error(0); return Error; }
ec183b61ddbed98995162032d249e3451ad523cea84779387b5d4ba8e1d4ad36
C++
120
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/polar_coordinates.hpp> int main() { int Error(0); return Error; }
6d815240d66585c0c7198b1394a9f07e2807a1241110403131ceb635db834883
C++
121
4
#ifdef ENABLE_GPU #error "The file nnfullyconnected.cu should be compiled instead" #endif #include "nnfullyconnected.cu"
91802a3af5a0512865e258d27fb8b00740da5f4b728a488ea03ea4b01d04cc1c
C++
121
4
VectorXi v = VectorXi::Random(4); cout << "Here is the vector v:\n"; for(auto x : v) cout << x << " "; cout << "\n";
d745daa59514de75c05171af613fdf7f93d6782d210dc4ad5bcfa0f9d88740f5
C++
121
6
MatrixXi m(3, 3); m << 1, 2, 3, 4, 5, 6, 7, 8, 9; m = (m.array() >= 5).select(-m, m); cout << m << endl;
35aef54f764a9088c33e55dc873acba2e6d2c013b9247f6a69396c9bae9e0ac1
C++
122
3
Matrix2d md = Matrix2d::Identity() * 0.45; Matrix2f mf = Matrix2f::Identity(); cout << md + mf.cast<double>() << endl;
5d5ab406ebbc074a9344089f06686bc9956e216da8c6d5fac62651bb84bd1c92
C++
122
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/matrix_transform_2d.hpp> int main() { int Error(0); return Error; }
adecbb91dfc4fab53ed0153fdd666c9920bdcb46ebe7a27e5a298ad8777c7774
C++
122
4
#if ENABLE_GPU #error This file should not be compiled with GPU support enabled #endif #include "vl_nnbilinearsampler.cu"
9ae85085ec47cf397ab550f1a95ce5a3ee622e646bd36ffe818ae95194a485f3
C++
123
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/matrix_cross_product.hpp> int main() { int Error(0); return Error; }
b96345636722538f01d9dcc61da59059a31b3c936c4eaf2e50fe6712f0885cc0
C++
123
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/matrix_major_storage.hpp> int main() { int Error(0); return Error; }
62ba4882af1862d48c1fb67f59322c569702b68da952f1ca3e5fb9786072dc2a
C++
125
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/rotate_normalized_axis.hpp> int main() { int Error(0); return Error; }
162a7e9bbf1ce69166830a518ec0eb1c8d29df04f5ae904e1ef2caf6563f7caa
C++
126
9
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/handed_coordinate_space.hpp> int main() { int Error(0); return Error; }
80e41e3427da529d9b344d16cb7739b88610c576771814e1ff640508cf6d5861
C++
132
3
Matrix2d a, b, c; a << 1,2,3,4; b << 5,6,7,8; c.noalias() = a * b; // this computes the product directly to c cout << c << endl;
9ea467b8de40ede5745fe87ffbea160e3c58396638b7e17ae51c0340fec937a4
C++
135
3
MatrixXd ones = MatrixXd::Ones(3,3); cout << "The operator norm of the 3x3 matrix of ones is " << ones.operatorNorm() << endl;
ced9e8a78ab4ac7842425a8e1d67f729240d5715ce85c55ba01edfd4fc459fa9
C++
137
5
MatrixXf matA(2, 2); matA << 1, 2, 3, 4; MatrixXf matB(4, 4); matB << matA, matA/10, matA/10, matA; std::cout << matB << std::endl;
ff00f809cb5cf2301c59df570b0f65af40e63070a57332d6952fb4a437910959
C++
139
9
#include <nlohmann/json.hpp> #include <iostream> using json = nlohmann::json; int main() { std::cout << json::meta() << std::endl; }
2d58827783df1ceea19e246ee087d98eab0ccbbf3836334aa7b557738e3b4576
C++
141
2
cout << VectorXi::LinSpaced(Sequential,4,7,10).transpose() << endl; cout << VectorXd::LinSpaced(Sequential,5,0.0,1.0).transpose() << endl;
a837e289b50f645602e6c62f05137b050434a9ce84e4a7b2cee12786b1c1fe4d
C++
141
3
int array[12]; for(int i = 0; i < 12; ++i) array[i] = i; cout << Map<MatrixXi, 0, OuterStride<> >(array, 3, 3, OuterStride<>(4)) << endl;
2a6708a5db2efc7710b3eb8f996f9ad2dcc6d207e4103f2fba1af54d04beeb41
C++
142
13
#define GLM_ENABLE_EXPERIMENTAL #include <glm/vec4.hpp> #include <glm/gtx/type_trait.hpp> int main() { int Error = 0; return Error; }
b1693030e296bdc2e2af6fff5b38dd0b6f70d34b4f935a1ce2853c192b793dc5
C++
143
6
// Override backend class in `test_spikes.cpp` #include <backends/gpu/fvm.hpp> #define USE_BACKEND gpu::backend #include "./test_spikes.cpp"
f4f332401fbc9ba5ad10fd6d6172a48be48a9e55351a4725da4a7a3557a77adf
C++
145
4
Array33i a = Array33i::Random(), b = Array33i::Random(); Array33i c = a * b; cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
84fe7a3c4970cfe8e6831a3489ea53aab827349547b5496ab67f0543d3efd66a
C++
148
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Its inverse is:" << endl << m.inverse() << endl;
aa359eeff271f3c558ff0b5bd75f104be0cb12ecb03f2e13a7e47258899f1ee5
C++
152
6
Matrix3f A; Vector3f b; A << 1,2,3, 4,5,6, 7,8,10; b << 3, 3, 4; Vector3f x = A.inverse() * b; cout << "The solution is:" << endl << x << endl;
29cd9164b08eb437c4b54b2349d78ef178827b84d0c7e27b1426a2610dc94d0a
C++
153
5
Matrix2i A = Matrix2i::Random(); cout << "Here are the coeffs of the 2x2 matrix A:\n"; for(auto x : A.reshaped()) cout << x << " "; cout << "\n";
391e9d9c6c7fc39aa8545bb518054a6df7e4896c42abe4996e978e5322bc2eae
C++
157
4
Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random(); Matrix3i c = a.cwiseProduct(b); cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
3f6684ab1b21c524f581ab2ba6443d1aed7cb51daedca421f993e0484a4245f4
C++
159
18
#include <gli/gli.hpp> namespace test { int test() { int Error(0); return Error; } }//namespace test int main() { int Error(0); return Error; }
4b6b90b97cd1b8449ba6997d449073061f1f8deed37eed07fc6b5eb6b9662238
C++
159
10
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtc/type_precision.hpp> #include <glm/gtx/associated_min_max.hpp> int main() { int Error(0); return Error; }
4a023269d316456ca22e0ba26b0cf42548e9c9f4fdad018567e7488731ec441b
C++
160
3
MatrixXd ones = MatrixXd::Ones(3,3); cout << "The operator norm of the 3x3 matrix of ones is " << ones.selfadjointView<Lower>().operatorNorm() << endl;
587d64ddeb289814dd9af1dadba4215e2f4c91ec3fe5235e975a43d82f25cdc8
C++
161
5
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD This is just some text that won't compile as a C++ file, as a basic sanity check for failtest. #else int main() {} #endif
089c18d124e08a1c2f62805bbd482549b1a50a83f67078bccf6afc5df2f3f2a0
C++
163
3
MatrixXd ones = MatrixXd::Ones(3,3); VectorXcd eivals = ones.eigenvalues(); cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
287c8e40b4ecf38a776c3fe1000390e4ac8d0518f97c1b117165c3b3fd4c9fbe
C++
163
3
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl;
1d83f7bcceff22a5c715fa6db10cfa068ae6215829ddb01742e56506f7643ce0
C++
164
7
Matrix4i A; A << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16; std::cout << Matrix2i::Map(&A(1,1),Stride<8,2>()) << std::endl;
8cbc0c2aee3cb64932369513d3cd7c95278ebc72da9cc2493f52dd5bc5d6422c
C++
165
6
Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; A.triangularView<Upper>().solveInPlace(b); cout << "The solution is:" << endl << b << endl;
4ce572b6f0a3253497b3606ceec965d58d87de6fae101463274398dcf52832b0
C++
167
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl;
cf966fc54575831dbfbe0703442f82f9129a30ef8f8356e6b482f6177872452d
C++
167
4
Vector3i v = Vector3i::Random(); cout << "Here is the vector v:" << endl << v << endl; cout << "v.replicate(2,5) = ..." << endl; cout << v.replicate(2,5) << endl;
5ff8819319ea6a59592e89ac0aa83e1c0e0c2d3184132f5831adce5c3ef84ea2
C++
168
4
std::vector<int> ind{4,2,5,5,3}; MatrixXi A = MatrixXi::Random(4,6); cout << "Initial matrix A:\n" << A << "\n\n"; cout << "A(all,ind):\n" << A(all,ind) << "\n\n";
2403008f237be5fedd6f49fe11c02896d4cd397c2961d6eb15e5ccee7cba1263
C++
169
5
int array[24]; for(int i = 0; i < 24; ++i) array[i] = i; cout << Map<MatrixXi, 0, Stride<Dynamic,2> > (array, 3, 3, Stride<Dynamic,2>(8, 2)) << endl;
57ecdada1d17d698c2ac981776a3a91a4d8efb4cd253f7d8113bae8a1ef1b6ea
C++
171
4
ArrayXi ind(5); ind<<4,2,5,5,3; MatrixXi A = MatrixXi::Random(4,6); cout << "Initial matrix A:\n" << A << "\n\n"; cout << "A(all,ind-1):\n" << A(all,ind-1) << "\n\n";
3dce187e8a947c9f9b52ba677c19a40e95dd7cbb1e57d0637a4207541385693d
C++
172
4
MatrixXf mat = MatrixXf::Random(2, 3); std::cout << mat << std::endl << std::endl; mat = (MatrixXf(2,2) << 0, 1, 1, 0).finished() * mat; std::cout << mat << std::endl;
46f58e0b511fc65cfcc8e82e36d9aaf1f625e8ecabf064ee4791bc1c2dc0e89e
C++
172
3
Matrix2cf m = Matrix2cf::Random(); cout << "Here is the 2x2 complex matrix m:" << endl << m << endl; cout << "Here is the adjoint of m:" << endl << m.adjoint() << endl;
65156fab31e4f5fd4e046726118ce515bbf81a49f0ada3db640e3e4c4cbb6343
C++
172
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is the product of each row:" << endl << m.rowwise().prod() << endl;
ea9e5881708d42533b8861cab4803991245414d92a61aad056866a27bcfcf845
C++
172
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl;
15bac7cfdf7594ef585943634792ca6ebbb04efe512dce4604ca135acd00e7f5
C++
174
4
MatrixXi m = MatrixXi::Random(2,3); cout << "Here is the matrix m:" << endl << m << endl; cout << "m.replicate<3,2>() = ..." << endl; cout << m.replicate<3,2>() << endl;
779f9a8ef318523a98ca78e01539b357e3bcb7d484220d5706814cd2628a245f
C++
174
10
#include <nlohmann/json.hpp> #include <iostream> #include <iomanip> using json = nlohmann::json; int main() { std::cout << std::setw(4) << json::meta() << std::endl; }
9e544a58686ed89dce461f897907779a89856e06052b425aa251b31ed67d56f4
C++
174
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is the product of all the coefficients:" << endl << m.prod() << endl;
d5dfebeea1a3617ff09244aa8a0ccdbcaf0a2d5636cf288155272768a93ed492
C++
177
6
MatrixXf M1(2,6); // Column-major storage M1 << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12; Map<MatrixXf> M2(M1.data(), 6,2); cout << "M2:" << endl << M2 << endl;
480e30996ea3fb94612fb722025c5ddc2651faa98e376a928ca39619eaf37b5f
C++
179
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is the maximum of each column:" << endl << m.colwise().maxCoeff() << endl;
8f19224dd1420bdf5e1cce09dfc32d77787aa455159d0b86733e321798a65d60
C++
179
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is the minimum of each column:" << endl << m.colwise().minCoeff() << endl;
0ae07f1a3ea31dbd01d77b91c6885235367c359c67043a9c9b1eeb2cfdc5e8da
C++
180
6
MatrixXf a(2,3); a << 1, 2, 3, 4, 5, 6; cout << "Here is the initial matrix a:\n" << a << endl; a.transposeInPlace(); cout << "and after being transposed:\n" << a << endl;
365963c4fcd87542c4047ad477c4b4d2942fd333b5fb4f272f13797cfe0db325
C++
180
4
MatrixXd ones = MatrixXd::Ones(3,3); EigenSolver<MatrixXd> es(ones, false); cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << es.eigenvalues() << endl;
5920a1feacf15bc885943353f4251c884301342db49b9c00b18f9191d79c48d6
C++
181
3
Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is m.reshaped(fix<2>,fix<8>):" << endl << m.reshaped(fix<2>,fix<8>) << endl;
5c6ccc4fa4a4068648dbeaf790cdcacf74f736ab72e1cf8fecba75d4e4ae2b24
C++
181
4
MatrixXf A = MatrixXf::Random(3, 2); VectorXf b = VectorXf::Random(3); cout << "The solution using the QR decomposition is:\n" << A.colPivHouseholderQr().solve(b) << endl;
357bc09c33be128779184073cd5671824a13facd83b54039b148b494ef49b82a
C++
183
3
Matrix3d m = Matrix3d::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here is the square norm of each row:" << endl << m.rowwise().squaredNorm() << endl;
6231ec48e869918fa353cf6bcdf5a6ad6cff85a9411d1bf6261f4865f481e8a8
C++
183
8
#include <atomic> #include <thalamus/tracing.hpp> namespace thalamus { static std::atomic_ullong next_id = 0; uint64_t get_unique_id() { return ++next_id; } } // namespace thalamus
d0a4d018caf3ccb9b8c224533b4798e01244c9fdccd4953a3eda6bc90e264f62
C++
183
4
Vector3i v = Vector3i::Random(); cout << "Here is the vector v:" << endl << v << endl; cout << "v.rowwise().replicate(5) = ..." << endl; cout << v.rowwise().replicate(5) << endl;
30e32010ec5efd9b33c1e3c4a4222354c92fa26b1ced09ec708e4a9710b12974
C++
184
4
RowVectorXf v = RowVectorXf::LinSpaced(20,0,19); cout << "Input:" << endl << v << endl; Map<RowVectorXf,0,InnerStride<2> > v2(v.data(), v.size()/2); cout << "Even:" << v2 << endl;
f79f3b4dcab0ffb3e850028ddc87b3e88acd650766e52ba9322ee758138ccbbb
C++
184
4
MatrixXd ones = MatrixXd::Ones(3,3); SelfAdjointEigenSolver<MatrixXd> es(ones); cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << es.eigenvalues() << endl;
e07684e9c6e643705bfcd3eaaeb45f26ed424f5bc3031dd862c26242c89c1662
C++
185
4
MatrixXd ones = MatrixXd::Ones(3,3); EigenSolver<MatrixXd> es(ones); cout << "The first eigenvector of the 3x3 matrix of ones is:" << endl << es.eigenvectors().col(0) << endl;
27354842aa20e2ddccf5ec6df0a37f62a6e82f696114e66c0380f38b98e1ddec
C++
187
8
// Cytosim was created by Francois Nedelec. Copyright 2007-2017 EMBL. #include "exceptions.h" /// This is used to align text in the error messages const char PREF[] = " | ";
2f56f654a93ee6a31fa9e011bb2228c1bc6f2bf4b6d2da62f531bbd174b1225a
C++
187
13
// This anonymous enum is essential to trigger the linking issue enum { Foo }; #include "bug1213.h" bool bug1213_1(const Eigen::Vector3f& x) { return bug1213_2(x); }