using System; using System.Collections.Generic; using System.Linq; using System.Text; using L = Science.Mathematics.LinearAlgebra; namespace Strang3Ed.Chapter02.Section4 { public class ExampleC { public ExampleC() { } private string result; public string Result { get { return result; } } public void Compute() { double[,] x = {{1.0,1.0,1.0}, {1.0,0.0,0.0}, {1.0,0.0,0.0}}; L.Matrix A = new L.Matrix(x); L.Matrix A2 = A * A; L.Matrix A3 = A2 * A; L.Matrix A4 = A3 * A; result += A.ToString(); result += A2.ToString(); result += A3.ToString(); result += A4.ToString(); } } } /* 1 1 1 1 0 0 1 0 0 3 1 1 1 1 1 1 1 1 5 3 3 3 1 1 3 1 1 11 5 5 5 3 3 5 3 3 */