Wiki » History » Version 3

Version 2 (Anonymous, 07/29/2011 05:01 PM) → Version 3/12 (M. Rolf, 09/20/2011 05:16 PM)

SVN: https://code.cor-lab.org/svn/nemomath/

h1. Wiki

* [[Installation]]

h2. Why NemoMath?

NemoMath is a math-library for robotics and learning... *so why don't you just use Eigen 2???*

The answer is twofold:

h3. 1.: NemoMath takes care of shared ownership issues in robotics/learning _applications and systems_.

Use Eigen (or similar Libs) in something more complex than one method of spaghetti code and you
need to think about two questions:
* Who is responsible for *deleting* an object?
* Who is allowed to *modify* an object (mutability) and when is a *copy* necessary?

The first thing that people usually come up with are smart-pointers like boost::shared_ptr. It solves the problem when to delete an object. But, it makes the mutability-issue even worse, since it is not transparent to const-correctness. There is always a danger that some other objects holds a smart pointer on your vector and modifies it.

NemoMath tackles these problem elegantly in the background by using
* Highly efficient intrusive-counters on internal data-objects. Passing a nemo::MathVector is almost as efficient as passing a plain C-pointer.
* Copy-on-write on all Vector and Matrix objects. You can pass them without expensive copying been performed. Once a write-operation takes place, the library takes care of a copy.

Due to these two features, working with nemo::MathVector and nemo::Matrix feels like using simple objects, with which you can do "value-based" programming.
Yet it avoids all the typical overhead. See source:root/trunk/nemomath/examples/ExampleVector.cpp

h3. 2.: NemoMath goes _far beyond linear algebra_.

Ultra-flexible Functor API (see source:/trunk/nemomath/examples/ExampleMappingArithmetics.cpp )

Convenient (in the next versions STL-compliant) container data-structures.