public static void PrintTape() { Console.WriteLine(""); Console.WriteLine(" ------------------------------- "); Console.WriteLine(" Tape interpretation"); Console.WriteLine(" ------------------------------- "); List <string[]> Out = new List <string[]>(); Out.Add(new string[] { " ", "#", "OPER", "ARG1", "ARG2", "VAL", "ADJ", "CONS" }); for (int i = 0; i < _tapeCounter; i++) { Out.Add(new string[] { " ", i.ToString(), AADUtility.GetTypeName(AADTape._operationIdentifier[i]), AADTape._argument1[i].ToString(), AADTape._argument2[i].ToString(), Math.Round(AADTape._value[i], 3).ToString(), Math.Round(AADTape.Adjoint[i], 3).ToString(), Math.Round(AADTape._constants[i], 3).ToString() }); } var Output = PrintUtility.PrintListNicely(Out, 5); Console.WriteLine(Output); }
public void Print() { Console.WriteLine(""); Console.WriteLine("--------- Printing OIS Schedule ---------"); Console.WriteLine("AsOf.......: " + AsOf); Console.WriteLine("DayCount...: " + DayCount); Console.WriteLine("DayRule....: " + DayRule); Console.WriteLine("StartDate..: " + StartDate.ToString("dd/MM/yyyy")); Console.WriteLine("EndDate....: " + EndDate.ToString("dd/MM/yyyy")); Console.WriteLine(""); var Lines = new List <string[]>(); Lines.Add(new[] { "UnAdjStart", "UnAdjEnd", "Start", "End", "Cvg" }); for (int j = 0; j < UnAdjStartDates.Count; j++) { Lines.Add(new[] { UnAdjStartDates[j].ToString("dd/MM/yyyy"), UnAdjEndDates[j].ToString("dd/MM/yyyy"), AdjStartDates[j].ToString("dd/MM/yyyy"), AdjEndDates[j].ToString("dd/MM/yyyy"), Math.Round(Coverages[j], 2).ToString() }); } var Output = PrintUtility.PrintListNicely(Lines, 3); Console.WriteLine(Output); Console.WriteLine("------------- Schedule end -------------"); }
public static void PrintResultSet() { Console.WriteLine("-------------------------"); Console.WriteLine(" AAD ResultSet"); Console.WriteLine("-------------------------"); Console.WriteLine(""); List <string[]> output = new List <string[]>(); output.Add(new string[] { "Ident", "Input", "Derivative" }); for (int i = 0; i < _AADResultSets.Count; i++) { output.Add(new string[] { _AADResultSets[i].Identifier, _AADResultSets[i].Input.ToString(), _AADResultSets[i].GetDerivative().ToString() }); } var actualOutput = PrintUtility.PrintListNicely(output); Console.WriteLine(actualOutput); }