sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
d6eb97b8777b31b32417de3b5e6b0ba178acab3189b7f54efe438d4b3dfecb41 | C++ | 72 | 3 | Matrix4i m = Matrix4i::Random();
m.row(1).setZero();
cout << m << endl;
|
359b2f22aa56aa5ea03126086e4a2556f2015967ab33e990703f1a3b12f10da1 | C++ | 73 | 2 | cout << RowVectorXi::Zero(4) << endl;
cout << VectorXf::Zero(2) << endl;
|
f460cf9a549f00c453edd1ba76f4be9b2c8be61540dca3cc8f8d6f0e86a37887 | C++ | 73 | 4 | Vector3d v(3,2,4);
Vector3d w(5,4,2);
v.cwise() /= w;
cout << v << endl;
|
fc4a9b67482604b2de231ab31e20b7622c2f4cc1327bd07a39860b2464a6a2ae | C++ | 73 | 4 | Vector3d v(1,2,3);
Vector3d w(2,3,0);
v.cwise() *= w;
cout << v << endl;
|
b24d767f4c8c5f8a647b2b342876aa2634ad04fbb0d1b6f1fd7aa20c281d3a83 | C++ | 75 | 2 | cout << Matrix2d::Ones() << endl;
cout << 6 * RowVector4i::Ones() << endl;
|
530d96c04d74a665a83255971a0f5bd059a2b3bb05095edc4aee33459b5717ae | C++ | 76 | 4 | MatrixXf matA(2,2);
matA << 2, 0, 0, 2;
matA = matA * matA;
cout << matA;
|
08e475b1a0129e2ba6c04c6383dd4b0470a3e13e71f1c9c5b83cb7e956ab0285 | C++ | 77 | 2 | cout << 6 * RowVectorXi::Ones(4) << endl;
cout << VectorXf::Ones(2) << endl;
|
c52a2b9d630436f785302778db8ba11c7f52ffd3f8f9a9ccfc43703473c41947 | C++ | 80 | 4 | MatrixXd m(2,3);
m << 2, -4, 6,
-5, 1, 0;
cout << m.cwiseAbs() << endl;
|
6b984249e4d39f7f07a0a55ad30cdb5fe6f74c1b718b003da41a4cf285717335 | C++ | 81 | 4 | MatrixXd m(2,3);
m << 2, -4, 6,
-5, 1, 0;
cout << m.cwiseAbs2() << endl;
|
485a485c3d2668c28ce6dd34cfc65febb8e27cbb015ac749e8a40f9a6856e783 | C++ | 82 | 3 | Matrix3d m = Matrix3d::Identity();
m.row(1) = Vector3d(4,5,6);
cout << m << endl;
|
9f63f7a7cccd03054cd4049a60c7d1461a20f574b2333d556a5637a1ad20f08c | C++ | 82 | 3 | Matrix3d m = Matrix3d::Identity();
m.col(1) = Vector3d(4,5,6);
cout << m << endl;
|
778170114fbfe3edfd07457452cefe13cc1324f435fbc071149b04002d39fbb2 | C++ | 83 | 3 | Matrix4i m = Matrix4i::Zero();
m.block<3,3>(1,0).setIdentity();
cout << m << endl;
|
3b04e4211b84ceea6b25e74ec539f93fa67cbb2e0ad4f4b90b9e556db55e0929 | C++ | 86 | 4 | MatrixXf matA(2,2);
matA << 2, 0, 0, 2;
matA.noalias() = matA * matA;
cout << matA;
|
69eb6a8b6a64a6837bb743ce3252fe580da5c2bf59d60937f12d0820cf53bf60 | C++ | 86 | 6 | #include "Transcript.h"
void Transcript::variationOutput(Variation &Var)
{
//
};
|
218043c12ab0de62b76cc9fe099e830b0fa165aaa65a145db8c219e53d45fac0 | C++ | 87 | 4 | MatrixXd m(2,3);
m << 2, 0.5, 1,
3, 0.25, 1;
cout << m.cwiseInverse() << endl;
|
72d9e80bbcde55817bf55731d619ebdb8dd0808050599c2460623d0ff85a0807 | C++ | 93 | 3 | int array[9];
for(int i = 0; i < 9; ++i) array[i] = i;
cout << Map<Matrix3i>(array) << endl;
|
f4ccc14a0adadc10b2a124adde5244813c611bcc88210d2ed544c08e06fd6020 | C++ | 105 | 4 | #include "GlobalVariables.h"
Stats g_statsAll;//global mapping statistics
ThreadControl g_threadChunks;
|
01831d9bcfae435952640b45e51182960672b8ff1cec54ac7569e1045fc77eec | C++ | 111 | 3 | MatrixXd m(3,4);
m.resize(NoChange, 5);
cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;
|
4e536163ce1027b0bd23f523a5053f087cc23e8e2904468057e2c0d40212cddf | C++ | 111 | 3 | MatrixXd m(3,4);
m.resize(5, NoChange);
cout << "m: " << m.rows() << " rows, " << m.cols() << " cols" << endl;
|
335fe9ae45f5e0f20f76f19966f61e03cd0560bdf4bf68ef7e5f6566beb0f573 | C++ | 113 | 6 | #include "xdfwriter.h"
#include "../external/boost/algorithm/string.hpp"
#include <iosfwd>
#include <iostream>
|
3c5770fd34235ab55802e1daeb20609bd01c941292fe605129a8f1b9029779f7 | C++ | 113 | 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;
|
43793081ad40acc7f4c092b9c1e0f2a7e857ba158fa91861bb3984c3c002935c | C++ | 115 | 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;
|
482ea05e580bddb98d26149613f13ac6941d4dc9d2ca0a19755b0dc595cfc45b | C++ | 117 | 2 | cout << VectorXi::LinSpaced(4,7,10).transpose() << endl;
cout << VectorXd::LinSpaced(5,0.0,1.0).transpose() << endl;
|
617b7217c0ec1ad82e3ef02418cd8f360706b6952028bc29ebbe1c44929a4ae8 | C++ | 119 | 3 | Matrix2d md = Matrix2d::Identity() * 0.45;
Matrix2f mf = Matrix2f::Identity();
cout << md + mf.cast<double>() << endl;
|
f155dec60dc80d5b49338de5449e2e5f9d39d1ea61fa968b69699e88f59ecb37 | C++ | 127 | 6 | #include <catch2/catch.hpp>
#include <lsl_c.h>
TEST_CASE("common") {
BENCHMARK("lsl_clock") { return lsl_local_clock(); };
}
|
d6b2aa9e49fd77eecdc6d9f82c174c4bcade0eb60cdb37e82c734d2214570cfb | C++ | 129 | 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;
|
88eeb06d554fb4cbd870befd1332fe5eadd2264ab01fe83b106c2c4ba141825d | C++ | 132 | 3 | MatrixXd ones = MatrixXd::Ones(3,3);
cout << "The operator norm of the 3x3 matrix of ones is "
<< ones.operatorNorm() << endl;
|
fc2538d9a1faecd84f3f5353463205e9de26a5af4167359b2a5e80b34509507b | C++ | 132 | 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;
|
3c6cc1c0174a6abdd1d2fb45f29634e5319c4e11b7adafe50d9ecf56dbc712d7 | C++ | 133 | 12 | #include "null.h"
#include "node.h"
namespace YAML
{
_Null Null;
bool IsNull(const Node& node)
{
return node.Read(Null);
}
}
|
a447ccb1647979a24597affc42932f6f19883aa16d4123c80dcc02168942f210 | C++ | 138 | 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;
|
328f4aebef04bfcc17818dc9df8b6066d94857bed65899fcaa5344ac512432b1 | C++ | 139 | 2 | cout << VectorXi::LinSpaced(Sequential,4,7,10).transpose() << endl;
cout << VectorXd::LinSpaced(Sequential,5,0.0,1.0).transpose() << endl;
|
01d2c0f46a80ca3c078643745ec2b1984bb858d5166bf8896f7230242436ab92 | C++ | 141 | 4 | Array33i a = Array33i::Random(), b = Array33i::Random();
Array33i c = a * b;
cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
|
1ab5bac78417a22ebc6056e2f1c32e5ca3d34c1b4848e98f6272ff890d101158 | C++ | 145 | 3 | Matrix3d m = Matrix3d::Random();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Its inverse is:" << endl << m.inverse() << endl;
|
e3d64f8396a67715ff48e2975d023c37f9017b0fec52df4d745078e542e57702 | C++ | 146 | 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;
|
15d3b279c18d3ef59111607b923c66a69f4653434442b249cd2a8f2546609ee1 | C++ | 149 | 4 | Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random();
Matrix3i c = a.cwise() * b;
cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
|
dc4637949b665b2a42be07bdb6f34ef4fb1c1775e87841dda6ce15b58f2977da | C++ | 152 | 3 | Matrix3i m = Matrix3i::Random();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is m.minor(1,1):" << endl << m.minor(1,1) << endl;
|
919dcbd27bc842b6894eaaf89b1e6e57fef49f142f46fb6e46e68d40e4a81ed1 | C++ | 153 | 4 | Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random();
Matrix3i c = a.cwiseProduct(b);
cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;
|
d88a6ae189948e2204a41bcfa7e795120bdb8b46cfaec612ecd46872f040ad65 | C++ | 156 | 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
|
c7d3c69b6aaaab6498bc52d2ff176abdca45737f58f43f3cf6de83aa48819fa7 | C++ | 157 | 3 | MatrixXd ones = MatrixXd::Ones(3,3);
cout << "The operator norm of the 3x3 matrix of ones is "
<< ones.selfadjointView<Lower>().operatorNorm() << endl;
|
36cca68786a85a7a336554d9dd6b78b3830de1f47dd6b88b559eb68b4288b3af | C++ | 159 | 7 | #include "ThreadControl.h"
ThreadControl::ThreadControl() {
chunkInN=0;
chunkOutN=0;
// chunkOutBAMposition=new uint [MAX_chunkOutBAMposition];
}; |
480058cc5c70a7ef4efc70cec3b42b4e57262a2439992d693de4eec09411c183 | C++ | 159 | 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;
|
acb132164f85937e3aef66f66f90f7f8c8df83f6f84600871afb9b4c2471ec34 | C++ | 160 | 3 | MatrixXd ones = MatrixXd::Ones(3,3);
VectorXcd eivals = ones.eigenvalues();
cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
|
af9442051c4aa6acc2fa09cf3355a4de7303c418d50a872d17b4bd9cfc7f0cbd | C++ | 163 | 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;
|
fbebdef6f29f00e051babc9956af5cc0dc40582949d04b50c5b45950a40867fb | C++ | 163 | 13 | #include "ReadAlign.h"
void ReadAlign::outputVariation(Variation &Var, Transcript Tr, uint iTr, uint nTr)
{
if (!Var.yes)
{
return;
};
};
|
13e39350cc0881cbcca3afa2f466207c1f73418eacb3316aa547946a670fc6ca | C++ | 164 | 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;
|
78f3e3e7c09f21b0a4df8660b4c19a816631d742c4680404592773807207f2a8 | C++ | 164 | 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;
|
86b3c8cac77208ee81c518614267c287c31f89456f319c1dd3a537f982425030 | C++ | 168 | 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;
|
7ec9a637f88d0bf75edac0d9cdc769c13e26afb0a0c4bda2f7c164755984bb22 | C++ | 169 | 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;
|
965b1b0314ac32051daf2aaa05706d6526e1cb281463474ebf366196fe6ee2db | C++ | 169 | 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;
|
ff83173d6a738e8b842c8c6b21bb3b1129cdf31f10743c15d007b40352bc7655 | C++ | 169 | 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;
|
9196ab82c11bd544106b7ef2b51b93edeb070330819aaa5938f50b0877830f91 | C++ | 170 | 8 | #include <catch2/catch.hpp>
#include <lsl_c.h>
// clazy:excludeall=non-pod-global-static
TEST_CASE("common") {
BENCHMARK("lsl_clock") { return lsl_local_clock(); };
}
|
e691c644abf67ad49416e2ecbb52091e94727e0c2c3c21107047a410b3ad1dca | C++ | 170 | 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;
|
21340a6d7502bf7486021f20549760450feba3172aaff46a4f63430d5f7a3b60 | C++ | 171 | 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;
|
befa0b1eab3bd02d9667c72077ad638c98e0dfcb70a0fe8b7d07f95a5e4943fb | C++ | 173 | 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; |
33e673972a762380edd575c51c006ba35f5bb26a0004c6cbd6994e552ec64f0d | C++ | 175 | 5 | Matrix3d m = Matrix3d::Random();
cout << "Here is the matrix m:" << endl << m << endl;
Matrix3d inv;
m.computeInverse(&inv);
cout << "Its inverse is:" << endl << inv << endl;
|
815d0dd935fb7229d9d384e949b65523a824398333a18dee67ecac238e3489e6 | C++ | 176 | 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;
|
b35d891525066cff829408f16d049b42728737036324d6fec3e564d753f3e270 | C++ | 176 | 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;
|
de5a6f75bfa26734da1ad9fef01aecfd21b27f502dd3834e6639772cbee7906e | C++ | 176 | 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;
|
db11e93b71b69d67d5918dd1c8291a26774cfc6cb83b8b121962bd367611327e | C++ | 179 | 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;
|
179d620a4f63b90aa495ae55667d58e2ef1ad04ea74fe4b76793681b144c41d0 | C++ | 180 | 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;
|
e0f06bdd88c4089da4aba460ff891d91be29c56c764ba220574f457451d01882 | C++ | 180 | 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;
|
8442d818af65e9708d9e5c5bb4994dc7d5e66fa595da1a652432cc905eca9622 | C++ | 182 | 5 | int data[] = {1,2,3,4,5,6,7,8,9};
Map<RowVectorXi> v(data,4);
cout << "The mapped vector v is: " << v << "\n";
new (&v) Map<RowVectorXi>(data+4,5);
cout << "Now v is: " << v << "\n"; |
88770697bc9d39ce6937ca3e1cd11a0a39acf4d964bfcab4ea4d5eaf68bf522a | C++ | 182 | 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(1) << endl;
|
b2f1df3cd1d7fb4fbf7c011cbcd0509eed096d994f94aa3397bd67647f19dcf7 | C++ | 184 | 3 | MatrixXd ones = MatrixXd::Ones(3,3);
VectorXd eivals = ones.selfadjointView<Lower>().eigenvalues();
cout << "The eigenvalues of the 3x3 matrix of ones are:" << endl << eivals << endl;
|
42468079463fa89e4f22e4a28afb54ad74ca56a8a7fc4c6c1aaea9f235dde7d8 | C++ | 186 | 4 | MatrixXi m = MatrixXi::Random(2,3);
cout << "Here is the matrix m:" << endl << m << endl;
cout << "m.colwise().replicate<3>() = ..." << endl;
cout << m.colwise().replicate<3>() << endl;
|
223d12e032c64a5791fdb8fbcbaf0d6e4b51031476c1ff981b14c0f474ee3286 | C++ | 187 | 5 | Matrix2i a; a << 1, 2, 3, 4;
cout << "Here is the matrix a:\n" << a << endl;
a = a.transpose(); // !!! do NOT do this !!!
cout << "and the result of the aliasing effect:\n" << a << endl; |
01aede2f6e3f17c51ca0bdc1ac2937fa83e01a6cc331ef6278a3aee5952abf4d | C++ | 188 | 4 | Matrix3i m = Matrix3i::Random();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here are the coefficients on the main diagonal of m:" << endl
<< m.diagonal() << endl;
|
3e5633de86c87d570f3eb4d08c23aa946eb78737b0c4ed5cf0ff54a712138c26 | C++ | 193 | 4 | MatrixXd ones = MatrixXd::Ones(3,3);
SelfAdjointEigenSolver<MatrixXd> es(ones);
cout << "The first eigenvector of the 3x3 matrix of ones is:"
<< endl << es.eigenvectors().col(1) << endl;
|
4ef6389e4292eacce70ca86ef29fedc550ba0f373692fe802d48b5621b35cf08 | C++ | 193 | 5 | MatrixXf a(2,2);
std::cout << "a is of size " << a.rows() << "x" << a.cols() << std::endl;
MatrixXf b(3,3);
a = b;
std::cout << "a is now of size " << a.rows() << "x" << a.cols() << std::endl;
|
c7c168c5c68b67ad20460c6b6ece5fd55e647cd81cd2deb49a54ba45e3e6c76d | C++ | 194 | 4 | MatrixXcf ones = MatrixXcf::Ones(3,3);
ComplexEigenSolver<MatrixXcf> ces(ones);
cout << "The first eigenvector of the 3x3 matrix of ones is:"
<< endl << ces.eigenvectors().col(1) << endl;
|
49c32b95aaaf70bbb6f7d8fa6c952faa96a4d13008df1dfed85fbabf07bead15 | C++ | 199 | 5 | int array[12];
for(int i = 0; i < 12; ++i) array[i] = i;
cout << Map<VectorXi, 0, InnerStride<2> >
(array, 6) // the inner stride has already been passed as template parameter
<< endl;
|
ef076abb1b07485d8519d6d6b7ff1215f23640962347475aa5788b00daa16768 | C++ | 206 | 14 | #include <iostream>
#include <Eigen/Dense>
using Eigen::MatrixXd;
int main()
{
MatrixXd m(2,2);
m(0,0) = 3;
m(1,0) = 2.5;
m(0,1) = -1;
m(1,1) = m(1,0) + m(0,1);
std::cout << m << std::endl;
}
|
b7a7cd3c96bd7f96c5efa6c71cea7b91f608ce57782093b1e41ed2eda0abf63a | C++ | 207 | 14 |
#include <include/matlab_bgl.h>
#include <stdio.h>
#include "libmbgl_funcs_test.h"
const char* errstr = "";
int main(int argc, char **argv) {
layout_funcs_test();
planar_funcs_test();
return 0;
}
|
0ccf9b57dc693c327ec589b411929860631f3d07d2a5cdf32a0c70adaedbd97f | C++ | 210 | 5 | Matrix3f m;
m = AngleAxisf(0.25*M_PI, Vector3f::UnitX())
* AngleAxisf(0.5*M_PI, Vector3f::UnitY())
* AngleAxisf(0.33*M_PI, Vector3f::UnitZ());
cout << m << endl << "is unitary: " << m.isUnitary() << endl;
|
3999ef81029c54049b04c0560b39a14e6087deeecc94cfaed0267cc94b33132e | C++ | 215 | 7 | int rows=5, cols=5;
MatrixXf m(rows,cols);
m << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(),
MatrixXf::Zero(3,cols-3),
MatrixXf::Zero(rows-3,3),
MatrixXf::Identity(rows-3,cols-3);
cout << m;
|
5b6add8aca4cc3cb16db10d733a3060e75f39636cf409bff0b739f46872df532 | C++ | 215 | 7 | // stdafx.cpp : source file that includes just the standard includes
// [!output PROJECT_NAME].pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
|
f7a925aa9d7164224342edf4003f9b299e76ea9cc9f40ba9ef2440665f648ae3 | C++ | 215 | 5 | Matrix3d m = Matrix3d::Zero();
m(0,2) = 1e-4;
cout << "Here's the matrix m:" << endl << m << endl;
cout << "m.isZero() returns: " << m.isZero() << endl;
cout << "m.isZero(1e-3) returns: " << m.isZero(1e-3) << endl;
|
368c276c665fe0ea9eba8836460367b07d4962fea2452d672c7f0f3a1e8217b3 | C++ | 216 | 5 | Matrix3d m = Matrix3d::Ones();
m(0,2) += 1e-4;
cout << "Here's the matrix m:" << endl << m << endl;
cout << "m.isOnes() returns: " << m.isOnes() << endl;
cout << "m.isOnes(1e-3) returns: " << m.isOnes(1e-3) << endl;
|
dbb9ebc75a2faf6cae549880429091d24f48c2008047dce2be38ce238c952c16 | C++ | 216 | 4 | MatrixXcf ones = MatrixXcf::Ones(3,3);
ComplexEigenSolver<MatrixXcf> ces(ones, /* computeEigenvectors = */ false);
cout << "The eigenvalues of the 3x3 matrix of ones are:"
<< endl << ces.eigenvalues() << endl;
|
8d745abdac4d6096b1aac9b68a801fb71a9ff40ed2e96d98a66cb2865566ea2b | C++ | 217 | 9 | /*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_core/juce_core.cpp>
|
82bb2b2e091f8397ecf1c906cae8dbb7102a4ce1d9042a3088541a1eaed09abc | C++ | 219 | 9 | /*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_video/juce_video.cpp>
|
ae327a5ec5d81c94c04203df251ce79df8a2ea2f63400f19b0a685a5aff2ac85 | C++ | 219 | 11 | extern "C" {
#include "../include/lsl/common.h"
LIBLSL_C_API const char *lsl_library_info(void) {
#ifdef LSL_LIBRARY_INFO_STR
return LSL_LIBRARY_INFO_STR;
#else
return "Unknown (not set by build system)";
#endif
}
}
|
217f68e2179b2fe706cdb843761dbe684adf24357921918ce07594bd34b34df7 | C++ | 221 | 9 | /*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_events/juce_events.cpp>
|
62c63a1bccc812d016160f384eb71e2ce0a8fb8cb43766855f584bcb68e6b07a | C++ | 221 | 4 | MatrixXcf A = MatrixXcf::Random(4,4);
cout << "Here is a random 4x4 matrix, A:" << endl << A << endl << endl;
ComplexSchur<MatrixXcf> schurOfA(A);
cout << "The unitary matrix U is:" << endl << schurOfA.matrixU() << endl;
|
d9f76c811c9fcd08a2217efd0da57a05418601fba5f2f3e71b6f234241be4d4e | C++ | 221 | 9 | /*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_opengl/juce_opengl.cpp>
|
542dc501987ce51ab56e8ebff4fff42304c96b7fd3afb8d0d2d796954a1aef09 | C++ | 222 | 3 | Matrix3d m = Matrix3d::Random();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the count of elements larger or equal than 0.5 of each row:" << endl << (m.array() >= 0.5).rowwise().count() << endl;
|
65f942f92171e78340304d7d602625942ed48c87bb7d4b328c918b6b9e3737a0 | C++ | 222 | 3 | Matrix3d m = Matrix3d::Random();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is the count of elements larger or equal than 0.5 of each row:" << endl << (m.cwise() >= 0.5).rowwise().count() << endl;
|
04c50bac4d2e61c97c68d6fe09f199ca0ff2dd3634f6e982bc3ca0e05924d4ff | C++ | 223 | 5 | RowVector4i v = RowVector4i::Random();
cout << "Here is the vector v:" << endl << v << endl;
cout << "Here is v.end(2):" << endl << v.end(2) << endl;
v.end(2).setZero();
cout << "Now the vector v is:" << endl << v << endl;
|
ff6f204b0fee91e81d8ca905dc12ea67f89dd9599bb47d78b8709ec40e014173 | C++ | 224 | 15 | #include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER float *ptr){
Map<Matrix3f> m(ptr);
}
int main() {}
|
1cc4e86bab15eda95d686519223dde43c1410e0e3daa47b895feb88aacbd6253 | C++ | 225 | 9 | /*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_graphics/juce_graphics.cpp>
|
23f4ae7f1d7b0713654dc9d659d2eae85d82ba4c124b087df576206f76d41273 | C++ | 226 | 5 | RowVector4i v = RowVector4i::Random();
cout << "Here is the vector v:" << endl << v << endl;
cout << "Here is v.tail(2):" << endl << v.tail(2) << endl;
v.tail(2).setZero();
cout << "Now the vector v is:" << endl << v << endl;
|
9c6d3eda036b886662cd635551895841b47c3569f835e640f77e54a987779676 | C++ | 226 | 5 | RowVector4i v = RowVector4i::Random();
cout << "Here is the vector v:" << endl << v << endl;
cout << "Here is v.head(2):" << endl << v.head(2) << endl;
v.head(2).setZero();
cout << "Now the vector v is:" << endl << v << endl;
|
9a5b293dfab9e4f661cfd2eb4bc40bb237d6a7defa108f6feaf7a168ea30616f | C++ | 227 | 5 | RowVector4i v = RowVector4i::Random();
cout << "Here is the vector v:" << endl << v << endl;
cout << "Here is v.end(2):" << endl << v.end<2>() << endl;
v.end<2>().setZero();
cout << "Now the vector v is:" << endl << v << endl;
|
a097fda3f19d9c0d3536e11c7da3f59ecd5b7673602ccb9e5ab6c7aa0d9de2d5 | C++ | 227 | 9 | /*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_gui_extra/juce_gui_extra.cpp>
|
771e89a5fdad79addce7ae43103632797345b0f6f2ab6ffc1fd4a3eab37409b7 | C++ | 228 | 15 | #include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m){
Diagonal<Matrix3d> d(m);
}
int main() {}
|
20c548ba90595115bad0135e4061acb94c622457268a139880799db29726c897 | C++ | 229 | 15 | #include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m){
Transpose<Matrix3d> t(m);
}
int main() {}
|
3181fda65db5e91ec93eee461d2c75ca9517dc10c16408d4e0fd93292dd9fc2a | C++ | 229 | 12 | #include <iostream>
#include <Eigen/Dense>
using namespace Eigen;
int main()
{
Matrix4d m;
m.resize(4,4); // no operation
std::cout << "The matrix m is of size "
<< m.rows() << "x" << m.cols() << std::endl;
}
|
368c8abca7cfb07f6593a0aa308a3ebf34089d80f3b42b75a5c782633be1d8e9 | C++ | 229 | 5 | RowVector4i v = RowVector4i::Random();
cout << "Here is the vector v:" << endl << v << endl;
cout << "Here is v.start(2):" << endl << v.start(2) << endl;
v.start(2).setZero();
cout << "Now the vector v is:" << endl << v << endl;
|
cee8ae9fc86d7bb1f1b6d541e6d58d4187bb792b98df51d790f98a67c656bc69 | C++ | 229 | 9 | /*
IMPORTANT! This file is auto-generated each time you save your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_gui_basics/juce_gui_basics.cpp>
|
4b7afeba550c42f9d83c1216d8b1f28efe9eb21defa44e01e94a8fde5aa5b682 | C++ | 230 | 5 | RowVector4i v = RowVector4i::Random();
cout << "Here is the vector v:" << endl << v << endl;
cout << "Here is v.head(2):" << endl << v.head<2>() << endl;
v.head<2>().setZero();
cout << "Now the vector v is:" << endl << v << endl;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.