Skip to content

Commit

Permalink
files ready for scloud online
Browse files Browse the repository at this point in the history
  • Loading branch information
chrdek committed Dec 5, 2023
1 parent fb46df7 commit 19b6b07
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions DataCalc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ public static IQueryable<IEnumerable<T>> CollEvenLength<T>(this IQueryable<IEnum
/// IQueryable<string></string> hamCheckStr = new List<string></string>{"test1","test2","test3","test2","10times49","20times46","times"}.AsQueryable();
/// var sourceStrings = new List<string></string> { "abc", "def", "xyz" }.AsQueryable();
///
/// sourceStrings.WhereDist<string></string>("abg",1);
/// sourceStrings.WhereDist<string></string>("aee",2);
/// hamCheckStr.WhereDist<string></string>("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.
/// </code>
/// </example>
public static IQueryable<string> WhereDist<T>(this IQueryable<string> str1, string str2, int distCheck)
public static IQueryable<string> WhereDist(this IQueryable<string> str1, string str2, int distCheck)
{

Expression<Func<string, bool>> distFilter = s1 => HammingDist(s1, str2) == distCheck;
Expand Down Expand Up @@ -281,7 +281,7 @@ public static T FreqOccur<T>(this IQueryable<T> source)
public static IQueryable<int[,]> SelectIntMatrix(this IQueryable<string> source, int defaultLen = 0)
{

Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "");
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25));
//preset filter for default values equality
Func<int, int> toUnsigned = (len) => len < 0 ? (-len) : len;
int limitInt = toUnsigned(defaultLen);
Expand Down Expand Up @@ -354,7 +354,7 @@ public static IQueryable<int[,]> SelectIntMatrix(this IQueryable<string> source,
if (conditions.Length == 0)
{
//checks for nulls etc prior to cleaning processed data..
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "");
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25));
Expression<Func<string, int[,]>> transfMap = str => ConvertTo2Dim(new[] { str }.AsQueryable(),

(int)Char.GetNumericValue(str.Length.ToString()[0]),
Expand All @@ -369,7 +369,7 @@ public static IQueryable<int[,]> SelectIntMatrix(this IQueryable<string> source,
}
else
{ //project the selected items per length into 1-dim counterpart..
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "");
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25));

Expression<Func<string, int[,]>> transfMap = str => (conditions.Any(condition => condition(str))) ?
new int[1, str.Length]
Expand Down

0 comments on commit 19b6b07

Please sign in to comment.