Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
For questions about writing C++ computational code or utilizing libraries written with C++.
3
votes
1
answer
2k
views
'Eigen' matrices with static dimension
I noticed that 'Eigen' matrices with dynamic dimension are less efficient than the matrices with static dimension. My algorithm uses a lot of matrices which don't need to be resized, so I wanted to us …
1
vote
Generating Random Orthogonal Matrices in C++
If $X$ is a $(n \times m)$-matrix whose entries are independently generated values from the standard normal distribution, then $X(X^{\top}X)^{-\frac12}$ is a uniformly generated random orthogonal matr …
2
votes
1
answer
609
views
Can one safely use an OpenMP parallel loop with Armadillo?
I have a C++ code performing some Armadillo computations in a loop. I'd like to parallelize this loop with OpenMP. But Armadillo automatically uses OpenMP for some computations. So, would the OpenMP p …
3
votes
Generating Random Orthogonal Matrices in C++
I've seen in your comment that you want a uniform sampling.
With the Eigen library, you can uniformly generate at random a unit quaternion:
Eigen::Quaterniond q = Eigen::Quaterniond::UnitRandom();
…
0
votes
0
answers
106
views
How to use a surface mesh parameterization?
I'm currently playing with the surface mesh parameterizations of the C++ library CGAL.
For a mesh with a boundary, the computed uv-space (parameterization domain) is either a disk or a square, and so …
1
vote
1
answer
326
views
Range of a matrix from its complete orthogonal decomposition
In this StackOverflow answer, @Gokul has shown how to get a basis of the kernel of a matrix with the help of the 'Eigen' function CompleteOrthogonalDecomposition. The complete orthogonal decompositio …
1
vote
Accepted
Range of a matrix from its complete orthogonal decomposition
I get it.
template <typename Number> // e.g. double or complex
Eigen::Matrix<Number, Eigen::Dynamic, Eigen::Dynamic> image_COD(
const Eigen::Matrix<Number, Eigen::Dynamic, Eigen::Dynamic>& M) {
…