This project has moved. For the latest updates, please go here.

I have implemented LinearAlgebra.Integer, but ...

Jan 13, 2015 at 10:53 PM
Edited Jan 13, 2015 at 11:22 PM
I've implemented the full (I think) LinearAlgebra for Integer (Int32).
(Anything that doesn't make sense when constrained to integers throws InvalidOperationException, like Svd, LU, QR...)
I think I've got the Unit Tests done also, but I have not used NUnit before (I used the VS2010 Unit Test system).
Can someone give me some assistance in actually running the Unit Tests (VS 2013) before I send the pull request?

(No F#. Also, no Mkl, etc.)
Coordinator
Jan 18, 2015 at 9:26 PM
I usually run them with ReSharper, but there is also an NUnit TestAdapter extension for VS 2013.

If this is more about verifying the unit test rather than debugging/stepping-through them, then you can also run them all with "build.cmd test" (or "build.sh test" in bash), see also in the docs.
Coordinator
Jan 18, 2015 at 9:47 PM
Just curious, what are typical use cases for such integer vectors and matrices? After all, integers do not form a field and therefore such "vectors" would not form a vector field - the very subject of linear algebra. Hence the need for InvalidOperationException.
Jan 20, 2015 at 4:38 PM
Edited Jan 20, 2015 at 8:34 PM
The main reason for adding Integer support (for me) is to make porting from Matlab easier.
I'm adding separate extension methods to allow for the indexing by integer-valued vectors/matrices that Matlab supports.
(I'm using extension methods so I'm not changing the generic classes' definitions. That could be integrated in the future...)

I'm also, separately, working on a one-based indexing version of the LinearAlgebra, as I discovered in past efforts converting Matlab to C++, adjusting Matlab's one-based indexing to the C++ zero-based indexing is quite error prone and extremely difficult to debug. (As in: a couple of days of single stepping the Matlab along with single stepping the C++.)
Feb 4, 2015 at 5:06 PM
I tried to run the "build.sh test" in bash.
It runs for awhile (about 5 min), generates an apparently valid TestResults.xml file, and reports the Failed and Ignored tests and then it gives the error:

Running build failed.
Error:
System.Exception: NUnit test failed (163).
at Fake.NUnitSequential.NUnit(FSharpFunc2 setParams, IEnumerable1 assemblies) in C:\code\fake\src\app\FakeLib\UnitTest\NUnit\Sequential.fs:line 45
at FSI_0001.Build.clo@385-41.Invoke(Unit _arg1) in C:\Users\mheffron\My Documents\GitHub\MathNet\mathnet-numerics\build.fsx:line 385
at Fake.TargetHelper.runTarget@317(String targetName) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 331
Status: Failure
1) System.Exception: NUnit test failed (163).
at Fake.NUnitSequential.NUnit(FSharpFunc2 setParams, IEnumerable1 assemblies) in C:\code\fake\src\app\FakeLib\UnitTest\NUnit\Sequential.fs:line 45
at FSI_0001.Build.clo@385-41.Invoke(Unit _arg1) in C:\Users\mheffron\My Documents\GitHub\MathNet\mathnet-numerics\build.fsx:line 385
at Fake.TargetHelper.runTarget@317(String targetName) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 331

So what happened?