public void SetRow_CanSetRowValue()
 {
     var ls = new LinearSystem(1, 4);
     ls.SetRow(0, 2, 4, 6, 8);
     Assert.AreEqual(ls[0, 0], 2);
     Assert.AreEqual(ls[0, 1], 4);
     Assert.AreEqual(ls[0, 2], 6);
     Assert.AreEqual(ls[0, 3], 8);
 }
 public void Normalize_NormalizesTheGivenRow()
 {
     var ls = new LinearSystem(1, 4);
     ls.SetRow(0, 2, 4, 6, 8);
     ls.Normalize(0, 0);
     var normalizedRow = ls[0];
     Assert.AreEqual(1, normalizedRow[0]);
     Assert.AreEqual(2, normalizedRow[1]);
     Assert.AreEqual(3, normalizedRow[2]);
     Assert.AreEqual(4, normalizedRow[3]);
 }
        public void SwapRows_ProducesExpectedOutput()
        {
            var ls = new LinearSystem(2, 2);
            ls.SetRow(0, 1, 2);
            ls.SetRow(1, 3, 4);
            ls.SwapRows(0, 1);

            Assert.AreEqual(3, ls[0, 0]);
            Assert.AreEqual(4, ls[0, 1]);
            Assert.AreEqual(1, ls[1, 0]);
            Assert.AreEqual(2, ls[1, 1]);
        }