/// <summary> /// Finds the distance between 2 instance of Text. /// </summary> /// <returns> /// A double representing the distance of the transition matrices. /// </returns> public static Text GetCentroidAmong(Text[] l) { double[][,] Matrices = new double[l.Length][, ]; for (int I = 0; I < l.Length; I++) { Matrices[I] = l[I].transition_matrix; } Text center = new Text(); center.transition_matrix = Basic.EntrywiseAverage(Matrices); center.file_name = "Hypothetical Centroid"; return(center); }