/// <summary> /// Only for this processor: /// </summary> /// Number of non-zero elements /// in the upper triangle. /// <returns></returns> static public int GetLocalNoOfUpperTriangularNonZeros(this IMutableMatrixEx M) { int odnz = 0; var rowPart = M.RowPartitioning; int i0 = (int)rowPart.i0; for (int i = (int)(rowPart.i0 + rowPart.LocalLength - 1); i >= i0; i--) { odnz += M.GetNoOfUpperTriangualNonZerosPerRow(i); } return(odnz); }