diff --git a/DataCalc.cs b/DataCalc.cs index cabe582..e8ca968 100644 --- a/DataCalc.cs +++ b/DataCalc.cs @@ -149,12 +149,12 @@ public static IQueryable> CollEvenLength(this IQueryable hamCheckStr = new List{"test1","test2","test3","test2","10times49","20times46","times"}.AsQueryable(); /// var sourceStrings = new List { "abc", "def", "xyz" }.AsQueryable(); /// - /// sourceStrings.WhereDist("abg",1); - /// sourceStrings.WhereDist("aee",2); - /// hamCheckStr.WhereDist("test3",1); // all return the appropriate filtered queryable search results. + /// sourceStrings.WhereDist("abg",1); + /// sourceStrings.WhereDist("aee",2); + /// hamCheckStr.WhereDist("test3",1); // all return the appropriate filtered queryable search results. /// /// - public static IQueryable WhereDist(this IQueryable str1, string str2, int distCheck) + public static IQueryable WhereDist(this IQueryable str1, string str2, int distCheck) { Expression> distFilter = s1 => HammingDist(s1, str2) == distCheck; @@ -281,7 +281,7 @@ public static T FreqOccur(this IQueryable source) public static IQueryable SelectIntMatrix(this IQueryable source, int defaultLen = 0) { - Expression> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", ""); + Expression> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25)); //preset filter for default values equality Func toUnsigned = (len) => len < 0 ? (-len) : len; int limitInt = toUnsigned(defaultLen); @@ -354,7 +354,7 @@ public static IQueryable SelectIntMatrix(this IQueryable source, if (conditions.Length == 0) { //checks for nulls etc prior to cleaning processed data.. - Expression> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", ""); + Expression> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25)); Expression> transfMap = str => ConvertTo2Dim(new[] { str }.AsQueryable(), (int)Char.GetNumericValue(str.Length.ToString()[0]), @@ -369,7 +369,7 @@ public static IQueryable SelectIntMatrix(this IQueryable source, } else { //project the selected items per length into 1-dim counterpart.. - Expression> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", ""); + Expression> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25)); Expression> transfMap = str => (conditions.Any(condition => condition(str))) ? new int[1, str.Length]