Bug in MathNet.Numerics.Providers.LinearAlgebra.ManagedLinearAlgebraProvider line 758
In the method "public void LUFactor(float[] data, int order, int[] ipiv)", you have in your code:
// Compute multipliers. if (j < order & data[indexjj] != 0.0) { ... }
You are missing the second & in your AND operation - otherwise you are doing a bitwise AND instead of the logical AND which is what you want. In your case it might actually work but it is misleading and error prone. It should be:
// Compute multipliers. if (j < order && data[indexjj] != 0.0) { ... }
Cheers!
Ilya
This is not a bug. The first is a logical AND operator and the second is a conditional logical AND operator. In principle, using the conditional logical AND will be slightly faster than the logical AND operation as the data[indexjj] != 0.0 evaluation would not be done when j >= order. However, this effect is likely small.