public void Setup() { _frame = GaSymFrame.CreateConformal(5); _lcpLookupTable = _frame.Lcp.ToHashMap(); for (var i = 0; i < 10; i++) { _multivectors.Add(_randGen.GetSymMultivector(_frame.GaSpaceDimension)); } }
public string Execute() { LogComposer.Clear(); var randGen = new GMacRandomGenerator(10); var mvList = new List <GaSymMultivector>(10); for (var i = 0; i < 10; i++) { mvList.Add(randGen.GetSymMultivector(Frame.GaSpaceDimension)); } //var mvA = GaMultivector.CreateSymbolic(Frame.GaSpaceDimension, "A"); //var mvB = GaMultivector.CreateSymbolic(Frame.GaSpaceDimension, "B"); var cacheMisses1 = SymbolicUtils.Cas.Connection.CacheMisses; var elapsedTime1 = SymbolicUtils.Cas.Connection.Stopwatch.Elapsed; var resultList = new List <GaSymMultivector>(mvList.Count * mvList.Count); foreach (var mv1 in mvList) { foreach (var mv2 in mvList) { resultList.Add(Frame.Gp[mv1, mv2]); } } var cacheMisses2 = SymbolicUtils.Cas.Connection.CacheMisses; var elapsedTime2 = SymbolicUtils.Cas.Connection.Stopwatch.Elapsed; //LogComposer // .AppendAtNewLine("A = ") // .AppendLine(mvA.ToString()); //LogComposer // .AppendAtNewLine("B = ") // .AppendLine(mvB.ToString()) // .AppendLine(); //LogComposer // .AppendAtNewLine("A gp B = ") // .AppendLine(gp.ToString()) // .AppendLine(); LogComposer .AppendAtNewLine("Symbolic Computations Count: ") .AppendLine(cacheMisses2 - cacheMisses1) .AppendAtNewLine("Symbolic Computations Time: ") .AppendLine(elapsedTime2 - elapsedTime1); return(LogComposer.ToString()); }