This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public class BoyerMooreString | |
{ | |
private const int CMaxValue = char.MaxValue; | |
private int[] _jumpTable; | |
private string _pattern; | |
private int _patternLength; | |
public BoyerMooreString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public class BoyerMooreGeneric<T> | |
{ | |
private readonly IEqualityComparer<T> _comparer; | |
private Dictionary<T, int> _jumpTable; | |
private T[] _pattern; | |
private int _patternLength; | |
public BoyerMooreGeneric() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
[DebuggerDisplay("Count = {" + nameof(Count) + "}")] | |
[Serializable] | |
public class MSet15<T> | |
{ | |
private int[] _hashBuckets; | |
internal IEqualityComparer<T> Comparer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading; | |
[DebuggerDisplay("Count = {" + nameof(Count) + "}")] | |
public class CcDictionary<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>> | |
{ | |
private readonly int _size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
[DebuggerDisplay("Count = {" + nameof(Count) + "}")] | |
[Serializable] | |
public class ObjectIndexer4 : IEnumerable<object> | |
{ | |
private readonly FNV1a32 hasher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Numerics; | |
public static class LinqHelper | |
{ | |
/// <summary> | |
/// Generates a sequence of character values within a specified range starting at | |
/// 'form' through 'to' with a given step value. | |
/// </summary> | |
public static IEnumerable<char> Range(char from, char to, char step = '\x0001') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
[Serializable] | |
public class SHA3ModInt : HashAlgorithmEx | |
{ | |
private readonly KeccakSpongeManaged _sponge; | |
public SHA3ModInt(int size, int rounds = 24, ulong[] seed = null) | |
{ | |
if (rounds > 24) | |
throw new Exception($"Maximum rounds allowed is {24}"); | |
var MaxBR = (64 >> 3) * 25; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Cryptography; | |
using System.Threading; | |
[Serializable] | |
public class JitterCacheRng : RandomNumberGenerator | |
{ | |
private const int ReSecureThreshold = 10; | |
private readonly SHA3ModInt _algorithm; | |
private readonly JitterEx _jit; | |
private readonly int _moveSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Threading; | |
public class ConcurrencyCheck | |
{ | |
public volatile ConcurrencyInfo ConcurrencyInformation = new ConcurrencyInfo(); | |
private static int ProcessorCount => Environment.ProcessorCount; | |
public bool OverrideAutoConcurrency | |
{ | |
get; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Numerics; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
[Serializable] | |
[DebuggerDisplay("{DDisplay}")] | |
public struct BigDecimal : IComparable, IComparable<BigDecimal>, IEquatable<BigDecimal> | |
{ | |
private const int MaxFactorials = 200; |
NewerOlder