public static int Test_C3() { SymbolMatrix C3 = SymbolMatrixUtilities.C3(new List <string> { "x", "y", "z" }); StringBuilder sb = new StringBuilder();//Start building latex sb.AppendFormat(@"{0}", C3.ToLatex()); HtmlOutputMethods.WriteLatexEqToHtmlAndLaunch(sb.ToString(), "Test_C3.html"); //display Latex via mathjax return(0); }
public static int Test_Flip() { SymbolMatrix C3Flip = SymbolMatrixUtilities.C3().Flip().ReName(new List <string> { "d", "e", "f" }); StringBuilder sb = new StringBuilder();//Start building latex sb.Append(@"\begin{aligned}"); sb.AppendFormat(@"&{0} \\ \\", SymbolMatrixUtilities.C3().ToLatex()); sb.AppendFormat(@"&{0}", C3Flip.ToLatex()); sb.Append(@"\end{aligned}"); HtmlOutputMethods.WriteLatexEqToHtmlAndLaunch(sb.ToString(), "Test_Flip.html"); //display Latex via mathjax return(0); }
public static SymbolMatrix D3() { SymbolMatrix retVal = new SymbolMatrix(6, 6); SymbolMatrix smC3 = C3(); SymbolMatrix C3Flip = SymbolMatrixUtilities.C3().Flip().ReName(new List <string> { "d", "e", "f" }); int rowCount; int colCount; for (rowCount = 0; rowCount < smC3.Rows; rowCount++) { for (colCount = 0; colCount < smC3.Columns; colCount++) { retVal[rowCount, colCount] = smC3[rowCount, colCount]; } } for (rowCount = 3; rowCount < smC3.Rows + 3; rowCount++) { for (colCount = 0; colCount < smC3.Columns; colCount++) { retVal[rowCount, colCount] = C3Flip[rowCount - 3, colCount]; } } for (rowCount = 3; rowCount < smC3.Rows + 3; rowCount++) { for (colCount = 3; colCount < smC3.Columns + 3; colCount++) { retVal[rowCount, colCount] = smC3[rowCount - 3, colCount - 3]; } } for (rowCount = 0; rowCount < smC3.Rows; rowCount++) { for (colCount = 3; colCount < smC3.Columns + 3; colCount++) { retVal[rowCount, colCount] = C3Flip[rowCount, colCount - 3]; } } return(retVal); }