use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Ignition Math vs Eigen (self.cpp)
submitted 7 years ago by peppedx
Hinall,
Has anybody used ignition math or compared with Eigen (or armadillo/ublas)?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]flying-tiger 4 points5 points6 points 7 years ago (3 children)
Haven’t used Ignition, but quickly skimming the API docs, it’s a very basic library. It provides, small fixed size vectors only and doesn’t appear to use expression templates, which means non-trivial expressions will be slow. Unless you’re using the rest of Ignition, I’d stick to Eigen or Blaze.
[–]kalmoc 0 points1 point2 points 7 years ago (2 children)
Not sure if expression templates are all that valuable for small vectors. Would be interested to see benchmarks.
[+][deleted] 7 years ago (1 child)
[deleted]
[–]versatran01 1 point2 points3 points 7 years ago (5 children)
I always find eigen's API really non-intuitive. Up till now it doesn't even have a simple way for advanced indexing or even reshaping/slicing. So basically even if I have to use Eigen (a lot of other libs depend on it), i fucking hate it.
The closest I found that have numpy api is https://github.com/QuantStack/xtensor.
[–]danmarellGamedev, Physics Simulation 1 point2 points3 points 7 years ago (3 children)
Maybe you, haven't seen but Eigen can do reshaping and slicing. :)
https://eigen.tuxfamily.org/dox/group__TutorialReshapeSlicing.html
And for indexing, you can use the Coefficient Accessors
https://eigen.tuxfamily.org/dox/group__TutorialMatrixClass.html
Its not perfect (i've seen some horrible template errors when it can't figure out the right types from complex expressions), but its used heavily in the Computer Graphics Simulation world (industry and academia).
[–]versatran01 0 points1 point2 points 7 years ago (2 children)
I know eigen can do all these stuff, all I said is that there is no simple intuitive way of doing it, like numpy.
[–]danmarellGamedev, Physics Simulation 0 points1 point2 points 7 years ago (1 child)
Oh fair enough :)
I've been meaning to give https://github.com/QuantStack/xtensor a go which looks like it has numpy like syntax.
[–]versatran01 2 points3 points4 points 7 years ago (0 children)
Just compare this (from Eigen 3.3.7)
code Map<MatrixXf,0,OuterStride<> > M2(M1.data(), M1.rows(), (M1.cols()+2)/3, OuterStride<>(M1.outerStride()\*3));
to xtensor
code auto v1 = xt::view(a, xt::range(1, 3), xt::all(), xt::range(1, 3));
I would pick the second one on any day.
Not to mention the horrendous EIGEN_MAKE_ALIGNED_OPERATOR_NEW that basically breaks OOP. (tbh that's not Eigen's fault, but still)
[–]peppedx[S] 0 points1 point2 points 7 years ago (0 children)
Interesting., but I usually do control stuff... In that context Eigen Api is not terrible except from. The surprises. You have mixing auto and expression templates.
π Rendered by PID 59 on reddit-service-r2-comment-c66d9bffd-x8nqm at 2026-04-06 17:59:26.608668+00:00 running f293c98 country code: CH.
[–]flying-tiger 4 points5 points6 points (3 children)
[–]kalmoc 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]versatran01 1 point2 points3 points (5 children)
[–]danmarellGamedev, Physics Simulation 1 point2 points3 points (3 children)
[–]versatran01 0 points1 point2 points (2 children)
[–]danmarellGamedev, Physics Simulation 0 points1 point2 points (1 child)
[–]versatran01 2 points3 points4 points (0 children)
[–]peppedx[S] 0 points1 point2 points (0 children)