Open source C++ library for vector mathematics

后端 未结 8 2310
迷失自我
迷失自我 2020-12-15 07:28

I would need some basic vector mathematics constructs in an application. Dot product, cross product. Finding the intersection of lines, that kind of stuff.

I can do

相关标签:
8条回答
  • 2020-12-15 07:56

    Armadillo

    Armadillo employs a delayed evaluation approach to combine several operations into one and reduce (or eliminate) the need for temporaries. Where applicable, the order of operations is optimised. Delayed evaluation and optimisation are achieved through recursive templates and template meta-programming.

    While chained operations such as addition, subtraction and multiplication (matrix and element-wise) are the primary targets for speed-up opportunities, other operations, such as manipulation of submatrices, can also be optimised. Care was taken to maintain efficiency for both "small" and "big" matrices.

    0 讨论(0)
  • 2020-12-15 07:57

    I've not tested it, but the C++ eigen library is becoming increasingly more popular these days. According to them, they are on par with the fastest libraries around there and their API looks quite neat to me.

    0 讨论(0)
提交回复
热议问题