Skip to content

Commit 9e948f3

Browse files
committed
Re-compiled changes etc.
1 parent 536572f commit 9e948f3

7 files changed

Lines changed: 49 additions & 26 deletions

File tree

bin/Debug/net462/DataCalc.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public static IQueryable<IEnumerable<T>> CollEvenLength<T>(this IQueryable<IEnum
138138
/// Retrieves a Queryable of string based on IEnumerable of string data types that equal
139139
/// to a current hamming value of N and input type str2 that are checked against.
140140
/// </summary>
141-
/// <typeparam name="T"></typeparam>
142141
/// <param name="str1">The leftmost string part to compare with</param>
143142
/// <param name="str2">The rightmost string part to compare against</param>
144143
/// <param name="distCheck">The hamming value to check per string comparison</param>
@@ -149,12 +148,12 @@ public static IQueryable<IEnumerable<T>> CollEvenLength<T>(this IQueryable<IEnum
149148
/// IQueryable<string></string> hamCheckStr = new List<string></string>{"test1","test2","test3","test2","10times49","20times46","times"}.AsQueryable();
150149
/// var sourceStrings = new List<string></string> { "abc", "def", "xyz" }.AsQueryable();
151150
///
152-
/// sourceStrings.WhereDist<string></string>("abg",1);
153-
/// sourceStrings.WhereDist<string></string>("aee",2);
154-
/// hamCheckStr.WhereDist<string></string>("test3",1); // all return the appropriate filtered queryable search results.
151+
/// sourceStrings.WhereDist("abg",1);
152+
/// sourceStrings.WhereDist("aee",2);
153+
/// hamCheckStr.WhereDist("test3",1); // all return the appropriate filtered queryable search results.
155154
/// </code>
156155
/// </example>
157-
public static IQueryable<string> WhereDist<T>(this IQueryable<string> str1, string str2, int distCheck)
156+
public static IQueryable<string> WhereDist(this IQueryable<string> str1, string str2, int distCheck)
158157
{
159158

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

284-
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "");
283+
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25));
285284
//preset filter for default values equality
286285
Func<int, int> toUnsigned = (len) => len < 0 ? (-len) : len;
287286
int limitInt = toUnsigned(defaultLen);
@@ -296,7 +295,7 @@ public static IQueryable<int[,]> SelectIntMatrix(this IQueryable<string> source,
296295
Expression<Func<string, int[,]>> transfMap = str => ConvertTo2Dim(new[] { str }.AsQueryable(),
297296

298297
(int)Char.GetNumericValue(str.Length.ToString()[0]),
299-
(int)(str.Length) / (int)Char.GetNumericValue(str.Length.ToString()[0])
298+
(str.Length) / (int)Char.GetNumericValue(str.Length.ToString()[0])
300299
);
301300

302301
//default filtering part, returns full set of values as 2dim array nxm
@@ -354,11 +353,11 @@ public static IQueryable<int[,]> SelectIntMatrix(this IQueryable<string> source,
354353
if (conditions.Length == 0)
355354
{
356355
//checks for nulls etc prior to cleaning processed data..
357-
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "");
356+
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25));
358357
Expression<Func<string, int[,]>> transfMap = str => ConvertTo2Dim(new[] { str }.AsQueryable(),
359358

360359
(int)Char.GetNumericValue(str.Length.ToString()[0]),
361-
(int)(str.Length) / (int)Char.GetNumericValue(str.Length.ToString()[0])
360+
(str.Length) / (int)Char.GetNumericValue(str.Length.ToString()[0])
362361
);
363362

364363

@@ -369,15 +368,15 @@ public static IQueryable<int[,]> SelectIntMatrix(this IQueryable<string> source,
369368
}
370369
else
371370
{ //project the selected items per length into 1-dim counterpart..
372-
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "");
371+
Expression<Func<string, string>> changeStr = strEl => Regex.Replace(string.IsNullOrEmpty(strEl) ? "0" : strEl, @"^\D$", "",RegexOptions.None,TimeSpan.FromSeconds(25));
373372

374373
Expression<Func<string, int[,]>> transfMap = str => (conditions.Any(condition => condition(str))) ?
375374
new int[1, str.Length]
376375
.Cast<int>()
377376
.Select((_, index) => char.IsDigit(str[index]) ? (int)char.GetNumericValue(str[index]) : 0)
378377
.ToArray()
379378
.To2DArray(1, str.Length)
380-
: ConvertTo2Dim(new[] { str }.AsQueryable(), (int)Char.GetNumericValue(str.Length.ToString()[0]), (int)(str.Length) / (int)Char.GetNumericValue(str.Length.ToString()[0]));
379+
: ConvertTo2Dim(new[] { str }.AsQueryable(), (int)Char.GetNumericValue(str.Length.ToString()[0]), (str.Length) / (int)Char.GetNumericValue(str.Length.ToString()[0]));
381380

382381
var executedSource = source.Select(changeStr);
383382
var resultArrays = executedSource.Select(transfMap.Compile());

bin/Debug/net462/Queryabl.dll

512 Bytes
Binary file not shown.

bin/Debug/net462/Queryabl.pdb

4 Bytes
Binary file not shown.

bin/Debug/net462/Queryabl.xml

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

logo.svg

Lines changed: 25 additions & 0 deletions
Loading

xrefmap.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,22 @@ references:
143143
isSpec: "True"
144144
fullName: Queryabl.DataCalc.Where
145145
nameWithType: DataCalc.Where
146+
- uid: Queryabl.DataCalc.WhereDist(System.Linq.IQueryable{System.String},System.String,System.Int32)
147+
name: WhereDist(IQueryable<string>, string, int)
148+
href: docs/Queryabl.DataCalc.html#Queryabl_DataCalc_WhereDist_System_Linq_IQueryable_System_String__System_String_System_Int32_
149+
commentId: M:Queryabl.DataCalc.WhereDist(System.Linq.IQueryable{System.String},System.String,System.Int32)
150+
name.vb: WhereDist(IQueryable(Of String), String, Integer)
151+
fullName: Queryabl.DataCalc.WhereDist(System.Linq.IQueryable<string>, string, int)
152+
fullName.vb: Queryabl.DataCalc.WhereDist(System.Linq.IQueryable(Of String), String, Integer)
153+
nameWithType: DataCalc.WhereDist(IQueryable<string>, string, int)
154+
nameWithType.vb: DataCalc.WhereDist(IQueryable(Of String), String, Integer)
146155
- uid: Queryabl.DataCalc.WhereDist*
147156
name: WhereDist
148157
href: docs/Queryabl.DataCalc.html#Queryabl_DataCalc_WhereDist_
149158
commentId: Overload:Queryabl.DataCalc.WhereDist
150159
isSpec: "True"
151160
fullName: Queryabl.DataCalc.WhereDist
152161
nameWithType: DataCalc.WhereDist
153-
- uid: Queryabl.DataCalc.WhereDist``1(System.Linq.IQueryable{System.String},System.String,System.Int32)
154-
name: WhereDist<T>(IQueryable<string>, string, int)
155-
href: docs/Queryabl.DataCalc.html#Queryabl_DataCalc_WhereDist__1_System_Linq_IQueryable_System_String__System_String_System_Int32_
156-
commentId: M:Queryabl.DataCalc.WhereDist``1(System.Linq.IQueryable{System.String},System.String,System.Int32)
157-
name.vb: WhereDist(Of T)(IQueryable(Of String), String, Integer)
158-
fullName: Queryabl.DataCalc.WhereDist<T>(System.Linq.IQueryable<string>, string, int)
159-
fullName.vb: Queryabl.DataCalc.WhereDist(Of T)(System.Linq.IQueryable(Of String), String, Integer)
160-
nameWithType: DataCalc.WhereDist<T>(IQueryable<string>, string, int)
161-
nameWithType.vb: DataCalc.WhereDist(Of T)(IQueryable(Of String), String, Integer)
162162
- uid: Queryabl.DataCalc.Where``1(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})
163163
name: Where<TSource>(IQueryable<TSource>, Expression<Func<TSource, bool>>)
164164
href: docs/Queryabl.DataCalc.html#Queryabl_DataCalc_Where__1_System_Linq_IQueryable___0__System_Linq_Expressions_Expression_System_Func___0_System_Boolean___

0 commit comments

Comments
 (0)