public void Update(Matrix <float> matrix) { var iterationMax = 0f; for (var x = 0; x < matrix.RowCount; x++) { for (var y = 0; y < matrix.ColumnCount; y++) { var value = matrix.At(x, y); iterationMax = Mathf.Max(value, iterationMax); value /= Mathf.Max(MaxValue, 1f); Texture.SetPixel(x, y, NetworkVisualizer.GetColor(value)); } } Texture.Apply(); MaxValue = iterationMax; }
public void Update(float value) { _texture.SetPixel(0, 0, NetworkVisualizer.GetColor(value)); _texture.Apply(); }