mathnet-numerics
mathnet-numerics copied to clipboard
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