//ELEMENTS MANAGEMENT public override void setElement(IComplexNumber element, int posRows, int posCols) { if (element == null) { _internalMatrix[posRows,posCols] = null; } else { if (element.IsZero()) { _internalMatrix[posRows,posCols] = null; } else { _internalMatrix[posRows,posCols] = element; } } }
public override void setElement(IComplexNumber element, int posRows, int posCols) { string key = generateKey(posRows,posCols); if (element == null) //{ _internalMatrix[key] = null; } { _internalMatrix.Remove(key); } else { if (element.IsZero()) //{ _internalMatrix[key] = null; } { _internalMatrix.Remove(key); } else { _internalMatrix[key] = element; } } }