public bool Equals(AirbusPerfTable other, double delta) { bool NodesEqual(IList <TableDataNode> a, IList <TableDataNode> b) { return(a != null && b != null && a.Count == b.Count && a.All(x => b.Any(y => x.Equals(y, delta)))); } return(other != null && HeadwindCorrectionTable.Equals(other.HeadwindCorrectionTable, delta) && TailwindCorrectionTable.Equals(other.TailwindCorrectionTable, delta) && UphillCorrectionTable.Equals(other.UphillCorrectionTable, delta) && DownHillCorrectionTable.Equals(other.DownHillCorrectionTable, delta) && NodesEqual(Tables, other.Tables) && WetCorrectionTable.Equals(other.WetCorrectionTable, delta) && Math.Abs(EngineAICorrection - other.EngineAICorrection) <= delta && Math.Abs(AllAICorrection - other.AllAICorrection) <= delta && Math.Abs(PacksOnCorrection - other.PacksOnCorrection) <= delta); }
/// <summary> /// Returns the available flaps in the order of first appearance of 'Tables' /// property. Since 'Tables' is in the same order as they appear in the xml /// file, this returning value preserves the order in xml file. /// </summary> public static IEnumerable <string> AvailableFlaps(this AirbusPerfTable t) => t.Tables.Select(x => x.Flaps).Distinct().OrderBy(s => s);