OpenGamma/OG-Maths — pull request #119 by stuartarchibald (2014-07-03 12:30:34+00:00)
Title: Mat 437 - implement the mldivide operation

This PR contains the code required to add the `mldivide` (matrix left division|magic backslash|super solver [depends who you ask]) algorithm. The code is a rough translation of the java variant of this from the OG-Maths prototype, but with both algorithmic changes and bug fixes added. Also, thanks to the massive templating effort, the complex domain variant of this algorithm came for free.

Unfortunately this PR is fairly heavy going, the algorithm is complicated in the first place, the memory management is hard work and the testing is fairly tricky. I've tried to add as much commentary regarding the alg and what the different branches etc. are doing inline. Similarly, the unit test pairs for `` each have a one liner stating their properties.

Coverage from the unit tests is extensive and in some places overlapping, this is with intention of ensuring the right branches are tripped. I've also manually checked each unit test pair to make sure that both real and complex data sets in the pair trip the same branches in the alg. Obviously the problem with a super solver is that it just keeps going so optimisation/efficiency attempts had to be manually checked to ensure e.g. a triangular matrix was indeed hitting a triangular back solver opposed to e.g. a SVD based solver.

Just as a process note: I've left the debugging flag on for now, so calls to this routine are a bit noisy as the decision tree is dumped to `stdout`. I intend to turn this off once we've run the fuzzer on this for a good long while, given the complexity, there's potential for bugs.

Further to the work on `mldivide`, I've added construct from `std::initializer_list` to the `OGXXXDenseMatrix` types on the C++ side, this considerably neatens and simplifies setting up input data in testing.

On the back of this work, it would appear sensible to create a "unrecoverable" error type from which a `xerbla_error` could be derived such that throws from the `lapack::` namespace of this sort of error are not caught under the standard `rdag_error&` catches. Similarly a `nonconformance_error` type would also be beneficial and be in the the same hierarchy. Ticket [[MAT-440]](http://jira.opengamma.com/browse/MAT-440) is raised to address this issue.

__Coverage__
Java: 77% (up 1%)
build/src/jshim 0.8% (no change)
build/src/librdag 17.1% (up 0.5%)
src/jshim 53.7% (no change)
src/librdag 94.2% (down 0.2%)
src/librdag/runners 94.5% (down 1.2%, missed branches for xerbla based fails and a branch I think is dead (see below)).