internal Func <List <double>, bool> GetFunc(DataStatsHolder data)
 {
     if (func == null || func.Count == 0)
     {
         return(x => true);
     }
     return(func.ContainsKey(FuncID(data)) ? func[FuncID(data)] : func.First().Value);
 }
 internal bool HasFunc(DataStatsHolder data)
 {
     return(func != null && func.ContainsKey(FuncID(data)));
 }
 internal static string FuncID(DataStatsHolder data)
 {
     return(data.dataNo + data.level + data.packageKey);
 }
 /// <summary>
 /// Used to make anonymous hardcoded filters (see S8020 etc.)
 /// </summary>
 /// <param name="data"></param>
 /// <param name="_func"></param>
 public Filter(DataStatsHolder data, Func <List <double>, bool> _func)
 {
     func = new Dictionary <string, Func <List <double>, bool> > {
         { FuncID(data), _func }
     };
 }