diff --git a/Assets/Scripts/ServerShared/Galaxy.cs b/Assets/Scripts/ServerShared/Galaxy.cs
index 600413c8b..68be78928 100644
--- a/Assets/Scripts/ServerShared/Galaxy.cs
+++ b/Assets/Scripts/ServerShared/Galaxy.cs
@@ -7,7 +7,6 @@ using System.Threading;
using System.Threading.Tasks;
using DataStructures.ViliWonka.Heap;
using Ink.Runtime;
-using JM.LinqFaster;
using UniRx;
using CultMath;
using static CultMath.math;
diff --git a/Assets/Scripts/ServerShared/ItemInstance.cs b/Assets/Scripts/ServerShared/ItemInstance.cs
index fc7bd85b5..da75134ce 100644
--- a/Assets/Scripts/ServerShared/ItemInstance.cs
+++ b/Assets/Scripts/ServerShared/ItemInstance.cs
@@ -8,7 +8,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using GameCult.Caching;
-//using JM.LinqFaster;
using MessagePack;
using MessagePack.Formatters;
using Newtonsoft.Json;
diff --git a/Assets/Scripts/ServerShared/ItemManager.cs b/Assets/Scripts/ServerShared/ItemManager.cs
index 25b467992..9bad8be23 100644
--- a/Assets/Scripts/ServerShared/ItemManager.cs
+++ b/Assets/Scripts/ServerShared/ItemManager.cs
@@ -11,7 +11,6 @@ using CultMath;
using static CultMath.math;
using float2 = CultMath.float2;
using Random = CultMath.Random;
-using JM.LinqFaster;
using UniRx;
using float4 = CultMath.float4;
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster.meta
deleted file mode 100644
index 4ed731785..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 8a827381b8571114091cd0fc9c0ebd1f
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Aggregate.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Aggregate.cs
deleted file mode 100644
index 9c60a91e6..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Aggregate.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- ///
- /// Provides faster array and list specific extension methods with
- /// the same semantics as the Linq extensions methods.
- ///
- public static partial class LinqFaster
- {
-
- // ------------------------------ Arrays --------------------------
-
- ///
- /// Applies an accumulator function over an array.
- ///
- /// An array to aggregate over.
- /// An accumulator function to be invoked on each element
- /// The final accumulator value
- public static TSource AggregateF(this TSource[] source, Func func)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (func == null)
- {
- throw Error.ArgumentNull("func");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- TSource result = source[0];
- for (int i = 1; i < source.Length; i++)
- {
- result = func(result, source[i]);
- }
- return result;
- }
-
- ///
- /// Applies an accumulator function over an array. The specified seed
- /// value is used as the initial accumulator value.
- ///
- /// An array to aggregate over.
- /// The initial accumulator value.
- /// An accumulator function to be invoked on each element
- /// The final accumulator value
- public static TAccumulate AggregateF(this TSource[] source, TAccumulate seed, Func func)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (func == null)
- {
- throw Error.ArgumentNull("func");
- }
-
- TAccumulate result = seed;
- foreach (var v in source)
- {
- result = func(result, v);
- }
- return result;
- }
-
- ///
- /// Applies an accumulator function over an array. The specified seed
- /// value is used as the initial accumulator value, and the specified
- /// function is used to select the result value.
- ///
- /// An array to aggregate over.
- /// The initial accumulator value.
- /// An accumulator function to be invoked on each element
- /// A function to transform the final accumulator value into the result value.
- /// The transformed final accumulator value
- public static TResult AggregateF(this TSource[] source, TAccumulate seed, Func func, Func resultSelector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (func == null)
- {
- throw Error.ArgumentNull("func");
- }
-
- if (resultSelector == null)
- {
- throw Error.ArgumentNull("resultSelector");
- }
-
- TAccumulate result = seed;
- foreach (var v in source)
- {
- result = func(result, v);
- }
- return resultSelector(result);
- }
-
- // ------------------------------ Lists --------------------------
-
- ///
- /// Applies an accumulator function over a List.
- ///
- ///
- /// A List to aggregate over.
- /// An accumulator function to be invoked on each element
- /// The final accumulator value
- public static TSource AggregateF(this List source, Func func)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (func == null)
- {
- throw Error.ArgumentNull("func");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- TSource result = source[0];
- for (int i = 1; i < source.Count; i++)
- {
- result = func(result, source[i]);
- }
- return result;
- }
-
- ///
- /// Applies an accumulator function over a List. The specified seed
- /// value is used as the initial accumulator value.
- ///
- /// A List to aggregate over.
- /// The initial accumulator value.
- /// An accumulator function to be invoked on each element
- /// The final accumulator value
- public static TAccumulate AggregateF(this List source, TAccumulate seed, Func func)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (func == null)
- {
- throw Error.ArgumentNull("func");
- }
-
- TAccumulate result = seed;
- for (int i = 0; i < source.Count; i++)
- {
- result = func(result, source[i]);
- }
- return result;
- }
-
- ///
- /// Applies an accumulator function over a List. The specified seed
- /// value is used as the initial accumulator value, and the specified
- /// function is used to select the result value.
- ///
- /// A List to aggregate over.
- /// The initial accumulator value.
- /// An accumulator function to be invoked on each element
- /// A function to transform the final accumulator value into the result value.
- /// The transformed final accumulator value
- public static TResult AggregateF(this List source, TAccumulate seed, Func func, Func resultSelector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (func == null)
- {
- throw Error.ArgumentNull("func");
- }
-
- if (resultSelector == null)
- {
- throw Error.ArgumentNull("resultSelector");
- }
-
- TAccumulate result = seed;
- for (int i = 0; i < source.Count; i++)
- {
- result = func(result, source[i]);
- }
- return resultSelector(result);
- }
-
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Aggregate.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Aggregate.cs.meta
deleted file mode 100644
index 58da970d6..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Aggregate.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: c982561dda0276f48b28c8fa12295ad4
-timeCreated: 1518622478
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/AnyAll.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/AnyAll.cs
deleted file mode 100644
index bd73fbec3..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/AnyAll.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
-
- // -------------------------- ARRAYS --------------------------------------------
-
- ///
- /// Determines whether an array contains any elements
- ///
- /// The array to check for emptiness
- /// true if the source array contains any elements, otherwise, false/
- public static bool AnyF(this T[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- return source.Length > 0;
- }
-
-
-
- ///
- /// Determines whether any element of an array satifies a condition.
- ///
- /// An array whose elements to apply the predicate to.
- /// A function to test each element for a condition.
- /// true if any elements in the source array pass the test in the specified predicate; otherwise, false.
- public static bool AnyF(this TSource[] source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- return Array.Exists(source, predicate);
- }
-
-
- ///
- /// Determines whether all elements of an array satisfy a condition.
- ///
- /// An array that contains the elements to apply the predicate to.
- /// A function to test each element for a condition.
- /// true if every element of the source array passes the test in the specified
- /// predicate, or if the array is empty; otherwise, false
- public static bool AllF(this TSource[] source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- return Array.TrueForAll(source, predicate);
- }
-
-
-
-
-
- // -------------------------- Lists --------------------------------------------
- ///
- /// Determines whether a list contains any elements
- ///
- /// The list to check for emptiness
- /// true if the source list contains any elements, otherwise, false/
- public static bool AnyF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- return source.Count > 0;
- }
-
- ///
- /// Determines whether any element of an array satifies a condition.
- ///
- /// An array whose elements to apply the predicate to.
- /// A function to test each element for a condition.
- /// true if any elements in the source array pass the test in the specified predicate; otherwise, false.
- public static bool AnyF(this List source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- return source.Exists(predicate);
- }
-
- ///
- /// Determines whether all elements of a list satisfy a condition.
- ///
- /// A list that contains the elements to apply the predicate to.
- /// A function to test each element for a condition.
- /// true if every element of the source array passes the test in the specified
- /// predicate, or if the list is empty; otherwise, false
- public static bool AllF(this List source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- return source.TrueForAll(predicate);
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/AnyAll.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/AnyAll.cs.meta
deleted file mode 100644
index 1cc9f27a4..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/AnyAll.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 0f33f6b80d5e4d24bb1f5b42a26585e8
-timeCreated: 1518622476
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Average.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Average.cs
deleted file mode 100644
index 25ca15f51..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Average.cs
+++ /dev/null
@@ -1,633 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
- // -------------------------- ARRAYS --------------------------------------------
-
- ///
- /// Computes the average of an array
- ///
- /// The array to calculate the average of.
- /// The average of the array.
- public static double AverageF(this int[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Length; i++)
- {
- sum += source[i];
- }
- }
- return (double)sum / source.Length;
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static double AverageF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Length; i++)
- {
- sum += selector(source[i]);
- }
- }
- return (double)sum / source.Length;
- }
-
- ///
- /// Computes the average of an array
- ///
- /// The array to calculate the average of.
- /// The average of the array.
- public static double AverageF(this long[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Length; i++)
- {
- sum += source[i];
- }
- }
- return (double)sum / source.Length;
- }
-
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static double AverageF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Length; i++)
- {
- sum += selector(source[i]);
- }
- }
- return (double)sum / source.Length;
- }
-
- ///
- /// Computes the average of an array
- ///
- /// The array to calculate the average of.
- /// The average of the array.
- public static float AverageF(this float[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Length; i++)
- {
- sum += source[i];
- }
-
- return (float)(sum / source.Length);
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static float AverageF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Length; i++)
- {
- sum += selector(source[i]);
- }
-
- return (float)(sum / source.Length);
- }
-
- ///
- /// Computes the average of an array
- ///
- /// The array to calculate the average of.
- /// The average of the array.
- public static double AverageF(this double[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Length; i++)
- {
- sum += source[i];
- }
-
- return sum / source.Length;
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static double AverageF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Length; i++)
- {
- sum += selector(source[i]);
- }
-
- return sum / source.Length;
- }
-
- ///
- /// Computes the average of an array
- ///
- /// The array to calculate the average of.
- /// The average of the array.
- public static decimal AverageF(this decimal[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- decimal sum = 0;
-
- for (int i = 0; i < source.Length; i++)
- {
- sum += source[i];
- }
-
- return sum / source.Length;
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static decimal AverageF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
-
- decimal sum = 0;
-
- for (int i = 0; i < source.Length; i++)
- {
- sum += selector(source[i]);
- }
-
- return sum / source.Length;
- }
-
- // -------------------------- Lists --------------------------------------------
-
- ///
- /// Computes the average of a list.
- ///
- /// The list to calculate the average of.
- /// The average of the list.
- public static double AverageF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Count; i++)
- {
- sum += source[i];
- }
- }
- return (double)sum / source.Count;
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static double AverageF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Count; i++)
- {
- sum += selector(source[i]);
- }
- }
- return (double)sum / source.Count;
- }
-
- ///
- /// Computes the average of a list.
- ///
- /// The list to calculate the average of.
- /// The average of the list.
- public static double AverageF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Count; i++)
- {
- sum += source[i];
- }
- }
- return (double)sum / source.Count;
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static double AverageF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- long sum = 0;
- checked
- {
- for (int i = 0; i < source.Count; i++)
- {
- sum += selector(source[i]);
- }
- }
- return (double)sum / source.Count;
- }
-
- ///
- /// Computes the average of a list.
- ///
- /// The list to calculate the average of.
- /// The average of the list.
- public static float AverageF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Count; i++)
- {
- sum += source[i];
- }
-
- return (float)(sum / source.Count);
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static float AverageF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Count; i++)
- {
- sum += selector(source[i]);
- }
-
- return (float)(sum / source.Count);
- }
-
- ///
- /// Computes the average of a list.
- ///
- /// The list to calculate the average of.
- /// The average of the list.
- public static double AverageF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Count; i++)
- {
- sum += source[i];
- }
-
- return sum / source.Count;
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static double AverageF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- double sum = 0;
-
- for (int i = 0; i < source.Count; i++)
- {
- sum += selector(source[i]);
- }
-
- return sum / source.Count;
- }
-
- ///
- /// Computes the average of a list.
- ///
- /// The list to calculate the average of.
- /// The average of the list.
- public static decimal AverageF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- decimal sum = 0;
-
- for (int i = 0; i < source.Count; i++)
- {
- sum += source[i];
- }
-
- return sum / source.Count;
- }
-
- ///
- /// Computes the average of values obtained by invoking a transform function on
- /// each element of the input array.
- ///
- /// The array to calculate the transformed average of.
- /// A transform function to apply to each element.
- /// The average of the array.
- public static decimal AverageF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
-
- decimal sum = 0;
-
- for (int i = 0; i < source.Count; i++)
- {
- sum += selector(source[i]);
- }
-
- return sum / source.Count;
- }
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Average.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Average.cs.meta
deleted file mode 100644
index a4ab01ad2..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Average.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 03ad52f1464dca347a72680cef2af96a
-timeCreated: 1518622476
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Contains.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Contains.cs
deleted file mode 100644
index 1b7fc1334..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Contains.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
-
- // -------------------------- ARRAYS --------------------------------------------
-
- ///
- /// Determines whether an array contains a specified element by using the
- /// provided IEqualityComparer.
- ///
- /// An array in which to locate a value.
- /// The value to locate.
- /// An equality comparer to compare values.
- /// true if the source sequence contains an element that has the specified value; otherwise, false.
- public static bool ContainsF(this TSource[] source, TSource value, IEqualityComparer comparer = null)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (comparer == null)
- {
- return Array.IndexOf(source, value) != -1;
- }
-
-
- foreach (TSource e in source)
- {
- if (comparer.Equals(e, value))
- {
- return true;
- }
- }
-
- return false;
- }
-
- // -------------------------- Lists --------------------------------------------
-
- ///
- /// Determines whether a list contains a specified element by using the
- /// provided IEqualityComparer.
- ///
- /// A list in which to locate a value.
- /// The value to locate.
- /// An equality comparer to compare values.
- /// true if the source sequence contains an element that has the specified value; otherwise, false.
- public static bool ContainsF(this List source, TSource value, IEqualityComparer comparer = null)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (comparer == null)
- {
- return source.IndexOf(value) != -1;
- }
-
-
- for (int i = 0; i < source.Count; i++)
- {
- if (comparer.Equals(source[i], value))
- {
- return true;
- }
- }
-
- return false;
- }
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Contains.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Contains.cs.meta
deleted file mode 100644
index 85c8d78c7..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Contains.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: b2bd3dc5ff6476641a57d43d3692ce23
-timeCreated: 1518622477
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Count.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Count.cs
deleted file mode 100644
index a844f3eaa..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Count.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
-
- // -------------------------- Arrays --------------------------------------------
-
- ///
- /// Returns a number that represents how many elements in the specified
- /// array satisfy a condition.
- ///
- /// An array that contains elements to be tested and counted.
- /// A function to test each element for a condition.
- /// A number that represents how many elements in the array satisfy the condition
- /// in the predicate function.
- public static int CountF(this T[] source, Func predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- int count = 0;
- for (int i = 0; i < source.Length; i++)
- {
- checked
- {
- if (predicate(source[i]))
- {
- count++;
- }
- }
- }
-
- return count;
- }
-
-
- // ------------------------------ Lists ---------------------
-
- ///
- /// Returns a number that represents how many elements in the specified
- /// list satisfy a condition.
- ///
- /// A list that contains elements to be tested and counted.
- /// A function to test each element for a condition.
- /// A number that represents how many elements in the list satisfy the condition
- /// in the predicate function.
- public static int CountF(this List source, Func predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- int count = 0;
- for (int i = 0; i < source.Count; i++)
- {
- checked
- {
- if (predicate(source[i]))
- {
- count++;
- }
- }
- }
-
- return count;
- }
-
-
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Count.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Count.cs.meta
deleted file mode 100644
index 2c4f37b21..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Count.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 5337c0db0f170274587167b132a927c7
-timeCreated: 1518622476
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Distinct.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Distinct.cs
deleted file mode 100644
index be96e5580..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Distinct.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
-
- // -------------------------- LISTS --------------------------------------------
-
-
- ///
- /// Removes duplicate elements from source, does not maintain order. Elements will be
- /// sorted in ascending order.
- ///
- /// The list to remove duplicate elements from.
- /// Optional IEqualityComparer to compare values.
- /// Optional IComparer to compare values.
- public static void DistinctInPlaceF(this List source, IEqualityComparer eqComparer = null, IComparer comparer = null)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (comparer == null)
- {
- comparer = Comparer.Default;
- }
-
- if (eqComparer == null)
- {
- eqComparer = EqualityComparer.Default;
- }
-
- source.Sort(comparer);
-
- TSource oldV = source[0];
- int pos = 1;
- for (int i = 1; i < source.Count; i++)
- {
- var newV = source[i];
- source[pos] = newV;
- if (!eqComparer.Equals(newV, oldV))
- {
- pos++;
- }
- oldV = newV;
- }
- source.RemoveRange(pos, source.Count - pos);
- }
-
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Distinct.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Distinct.cs.meta
deleted file mode 100644
index bb6b0fb55..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Distinct.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: d04d64ff5ae302449a864bfaae8dcfda
-timeCreated: 1518622478
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/First.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/First.cs
deleted file mode 100644
index 51f818a40..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/First.cs
+++ /dev/null
@@ -1,202 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
-
- // -------------------------- Arrays --------------------------------------------
-
- ///
- /// Returns the first element of an array.
- ///
- /// The array to return the first element of.
- /// The first element in the specified array.
- public static T FirstF(this T[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- return source[0];
- }
-
- ///
- /// Returns the first element in an array that satisfies a specified condition.
- ///
- /// An array to return an element from.
- /// A function to teast each element for a condition.
- /// The first element that satisfies the condition.
- public static T FirstF(this T[] source, Func predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- for (int i = 0; i < source.Length; i++)
- {
- if (predicate(source[i]))
- {
- return source[i];
- }
- }
-
- throw Error.NoMatch();
- }
-
-
-
-
- ///
- /// Returns the first element of an array, or a default value if the
- /// array contains no elements.
- ///
- /// The array to return the first element of.
- /// default value if source is empty, otherwise, the first element
- /// in source.
- public static T FirstOrDefaultF(this T[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- return default(T);
- }
- return source[0];
- }
-
- ///
- /// Returns the first element of the sequence that satisfies a condition or a
- /// default value if no such element is found.
- ///
- /// An IEnumerable to return an element from.
- /// A function to test each element for a condition.
- ///
- public static T FirstOrDefaultF(this T[] source, Func predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- for (int i = 0; i < source.Length; i++)
- {
- if (predicate(source[i]))
- {
- return source[i];
- }
- }
-
- return default(T);
- }
-
- // -------------------------- Lists --------------------------------------------
-
- ///
- /// Returns the first element of a list
- ///
- /// The list to return the first element of.
- /// The first element in the specified list.
- public static T FirstF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- return source[0];
- }
-
- ///
- /// Returns the first element in a list that satisfies a specified condition.
- ///
- /// An list to return an element from.
- /// A function to teast each element for a condition.
- /// The first element in the list that satisfies the condition.
- public static T FirstF(this List source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- var firstIndex = source.FindIndex(predicate);
- if (firstIndex == -1)
- throw Error.NoMatch();
- else
- return source[firstIndex];
- }
-
- ///
- /// Returns the first element of an array, or a default value if the
- /// array contains no elements.
- ///
- /// The array to return the first element of.
- /// default value if source is empty, otherwise, the first element
- /// in source.
- public static T FirstOrDefaultF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- return default(T);
- }
- return source[0];
- }
-
- ///
- /// Returns the first element of the sequence that satisfies a condition or a
- /// default value if no such element is found.
- ///
- /// An IEnumerable to return an element from.
- /// A function to test each element for a condition.
- ///
- public static T FirstOrDefaultF(this List source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- var firstIndex = source.FindIndex(predicate);
- if (firstIndex == -1)
- return default(T);
- else
- return source[firstIndex];
- }
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/First.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/First.cs.meta
deleted file mode 100644
index b438fed5c..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/First.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 7c8f855844813a24f8d07be8c7d7b7c5
-timeCreated: 1518622476
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Last.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Last.cs
deleted file mode 100644
index cb8d8a6e8..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Last.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
- // -------------------------- Arrays --------------------------------------------
-
- ///
- /// Returns the last element of a sequence.
- ///
- /// An sequence to return the last element of.
- /// The value at the last position in the source sequence.
- public static T LastF(this T[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- return source[source.Length - 1];
- }
-
- ///
- /// Returns the last element of a sequence that satisfies a specified condition.
- ///
- /// A sequence to return an element from.
- /// A function to test each element for a condition.
- ///
- public static T LastF(this T[] source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- var lastIndex = Array.FindLastIndex(source, predicate);
-
- if (lastIndex == -1)
- throw Error.NoMatch();
- else
- return source[lastIndex];
- }
-
- ///
- /// Returns the last element of a sequence, or a default value if the sequence contains no elements.
- ///
- /// An sequence to return the last element of.
- /// default value if the source sequence is empty; otherwise,
- /// the last element in the sequence
- public static T LastOrDefaultF(this T[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- return default(T);
- }
- return source[source.Length - 1];
- }
-
- ///
- /// Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.
- ///
- /// A sequence to return the last element of.
- /// A function to test each element for a condition.
- /// default value if the sequence is empty or if no elements pass the test
- /// in the predicate function; otherwise, the last element that passes the test in the
- /// predicate function.
- public static T LastOrDefaultF(this T[] source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- var lastIndex = Array.FindLastIndex(source, predicate);
-
- if (lastIndex == -1)
- return default(T);
- else
- return source[lastIndex];
- }
-
- // -------------------------- Lists --------------------------------------------
-
- ///
- /// Returns the last element of a sequence.
- ///
- /// An sequence to return the last element of.
- /// The value at the last position in the source sequence.
- public static T LastF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- return source[source.Count - 1];
- }
-
- ///
- /// Returns the last element of a sequence that satisfies a specified condition.
- ///
- /// A sequence to return an element from.
- /// A function to test each element for a condition.
- ///
- public static T LastF(this List source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- var lastIndex = source.FindLastIndex(predicate);
-
- if (lastIndex == -1)
- throw Error.NoMatch();
- else
- return source[lastIndex];
- }
-
- ///
- /// Returns the last element of a sequence, or a default value if the sequence contains no elements.
- ///
- /// An sequence to return the last element of.
- /// default value if the source sequence is empty; otherwise,
- /// the last element in the sequence
- public static T LastOrDefaultF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- return default(T);
- }
- return source[source.Count - 1];
- }
-
- ///
- /// Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.
- ///
- /// A sequence to return the last element of.
- /// A function to test each element for a condition.
- /// default value if the sequence is empty or if no elements pass the test
- /// in the predicate function; otherwise, the last element that passes the test in the
- /// predicate function.
- public static T LastOrDefaultF(this List source, Predicate predicate)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (predicate == null)
- {
- throw Error.ArgumentNull("predicate");
- }
-
- var lastIndex = source.FindLastIndex(predicate);
-
- if (lastIndex == -1)
- return default(T);
- else
- return source[lastIndex];
- }
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Last.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Last.cs.meta
deleted file mode 100644
index 0b0e795b1..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Last.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: aaf88d2684a9a9145ae297d38036fc14
-timeCreated: 1518622477
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Max.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Max.cs
deleted file mode 100644
index 4e208567b..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Max.cs
+++ /dev/null
@@ -1,779 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- //int, long, float,double, decimal
- public static partial class LinqFaster
- {
- // -------------------------- ARRAYS --------------------------------------------
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static T MaxF(this T[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- T r = default(T);
- if (r == null)
- {
- r = source[0];
- for (int i = 1; i < source.Length; i++)
- {
- if (source[i] != null && comparer.Compare(source[i], r) > 0) r = source[i];
- }
- }
- else
- {
- r = source[0];
- for (int i = 1; i < source.Length; i++)
- {
- if (comparer.Compare(source[i], r) > 0) r = source[i];
- }
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static TResult MaxF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- TResult r = default(TResult);
- if (r == null)
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v != null && comparer.Compare(v, r) > 0) r = v;
- }
- }
- else
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (comparer.Compare(v, r) > 0) r = v;
- }
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static int MaxF(this int[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- int r = int.MinValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static int MaxF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- int r = int.MinValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static long MaxF(this long[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- long r = long.MinValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static long MaxF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- long r = long.MinValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static float MaxF(this float[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- float r = source[0];
- int startIndex = 0;
- for (; startIndex < source.Length; startIndex++)
- {
- if (!float.IsNaN(source[startIndex]))
- {
- r = source[startIndex];
- break;
- }
- }
- for (int i = startIndex; i < source.Length; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static float MaxF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- float r = selector(source[0]);
- int startIndex = 0;
- for (; startIndex < source.Length; startIndex++)
- {
- var v = selector(source[startIndex]);
- if (!float.IsNaN(v))
- {
- r = v;
- break;
- }
- }
- for (int i = startIndex; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static double MaxF(this double[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- double r = source[0];
- int startIndex = 0;
- for (; startIndex < source.Length; startIndex++)
- {
- if (!double.IsNaN(source[startIndex]))
- {
- r = source[startIndex];
- break;
- }
- }
- for (int i = startIndex; i < source.Length; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static double MaxF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- double r = selector(source[0]);
- int startIndex = 0;
- for (; startIndex < source.Length; startIndex++)
- {
- var v = selector(source[startIndex]);
- if (!double.IsNaN(v))
- {
- r = v;
- break;
- }
- }
- for (int i = startIndex; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static decimal MaxF(this decimal[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- decimal r = decimal.MinValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static decimal MaxF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- decimal r = decimal.MinValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- // -------------------------- LISTS --------------------------------------------
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static T MaxF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- T r = default(T);
- if (r == null)
- {
- r = source[0];
- for (int i = 1; i < source.Count; i++)
- {
- if (source[i] != null && comparer.Compare(source[i], r) > 0) r = source[i];
- }
- }
- else
- {
- r = source[0];
- for (int i = 1; i < source.Count; i++)
- {
- if (comparer.Compare(source[i], r) > 0) r = source[i];
- }
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static TResult MaxF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- TResult r = default(TResult);
- if (r == null)
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v != null && comparer.Compare(v, r) > 0) r = v;
- }
- }
- else
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (comparer.Compare(v, r) > 0) r = v;
- }
- }
- return r;
- }
-
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static int MaxF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- int r = int.MinValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static int MaxF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- int r = int.MinValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static long MaxF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- long r = long.MinValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static long MaxF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("source");
- }
- long r = long.MinValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static float MaxF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- float r = source[0];
- int startIndex = 0;
- for (; startIndex < source.Count; startIndex++)
- {
- if (!float.IsNaN(source[startIndex]))
- {
- r = source[startIndex];
- break;
- }
- }
- for (int i = startIndex; i < source.Count; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static float MaxF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- float r = selector(source[0]);
- int startIndex = 0;
- for (; startIndex < source.Count; startIndex++)
- {
- var v = selector(source[startIndex]);
- if (!float.IsNaN(v))
- {
- r = v;
- break;
- }
- }
- for (int i = startIndex; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static double MaxF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- double r = source[0];
- int startIndex = 0;
- for (; startIndex < source.Count; startIndex++)
- {
- if (!double.IsNaN(source[startIndex]))
- {
- r = source[startIndex];
- break;
- }
- }
- for (int i = startIndex; i < source.Count; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static double MaxF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- double r = selector(source[0]);
- int startIndex = 0;
- for (; startIndex < source.Count; startIndex++)
- {
- var v = selector(source[startIndex]);
- if (!double.IsNaN(v))
- {
- r = v;
- break;
- }
- }
- for (int i = startIndex; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the maximum value in a sequence of values.
- ///
- /// A sequence of values to determine the maximum of.
- /// The maximum value in the sequence
- public static decimal MaxF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- decimal r = decimal.MinValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] > r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static decimal MaxF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- decimal r = decimal.MinValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v > r) r = v;
- }
- return r;
- }
-
-
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Max.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Max.cs.meta
deleted file mode 100644
index fd07caf68..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Max.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: c48e3dffd69eb0a4e8e135b38d3d9bf0
-timeCreated: 1518622477
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Min.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Min.cs
deleted file mode 100644
index 6261bc93e..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Min.cs
+++ /dev/null
@@ -1,711 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- //int, long, float,double, decimal
- public static partial class LinqFaster
- {
- // -------------------------- ARRAYS --------------------------------------------
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static T MinF(this T[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- T r = default(T);
- if (r == null)
- {
- r = source[0];
- for (int i = 1; i < source.Length; i++)
- {
- if (source[i] != null && comparer.Compare(source[i], r) < 0) r = source[i];
- }
- }
- else
- {
- r = source[0];
- for (int i = 1; i < source.Length; i++)
- {
- if (comparer.Compare(source[i], r) < 0) r = source[i];
- }
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static TResult MinF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- TResult r = default(TResult);
- if (r == null)
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v != null && comparer.Compare(v, r) < 0) r = v;
- }
- }
- else
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (comparer.Compare(v, r) < 0) r = v;
- }
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static int MinF(this int[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- int r = int.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] < r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static int MinF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- int r = int.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static long MinF(this long[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- long r = long.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] < r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static long MinF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- long r = long.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static float MinF(this float[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- float r = float.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] < r) r = source[i];
- else if (float.IsNaN(source[i])) return source[i];
-
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static float MinF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- float r = float.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- else if (float.IsNaN(v)) return v;
-
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static double MinF(this double[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- double r = double.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] < r) r = source[i];
- else if (double.IsNaN(source[i])) return source[i];
- }
-
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static double MinF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- double r = double.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- else if (double.IsNaN(v)) return v;
-
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static decimal MinF(this decimal[] source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- decimal r = decimal.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- if (source[i] < r) r = source[i];
- }
- return r;
- }
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static decimal MinF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Length == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- decimal r = decimal.MaxValue;
- for (int i = 0; i < source.Length; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- }
- return r;
- }
-
- // -------------------------- LISTS --------------------------------------------
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static T MinF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- T r = default(T);
- if (r == null)
- {
- r = source[0];
- for (int i = 1; i < source.Count; i++)
- {
- if (source[i] != null && comparer.Compare(source[i], r) < 0) r = source[i];
- }
- }
- else
- {
- r = source[0];
- for (int i = 1; i < source.Count; i++)
- {
- if (comparer.Compare(source[i], r) < 0) r = source[i];
- }
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static int MinF(this Listsource)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- int r = int.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] < r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static int MinF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- int r = int.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static long MinF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- long r = long.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] < r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static long MinF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("source");
- }
- long r = long.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static float MinF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- float r = float.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] < r) r = source[i];
- else if (float.IsNaN(source[i])) return source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static float MinF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- float r = float.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- else if (float.IsNaN(v)) return v;
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static double MinF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- double r = double.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] < r) r = source[i];
- else if (double.IsNaN(source[i])) return source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static double MinF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- double r = double.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- else if (double.IsNaN(v)) return v;
- }
- return r;
- }
-
- ///
- /// Returns the minimum value in a sequence of values.
- ///
- /// A sequence of values to determine the minimum of.
- /// The minimum value in the sequence
- public static decimal MinF(this List source)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- decimal r = decimal.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- if (source[i] < r) r = source[i];
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static decimal MinF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
- decimal r = decimal.MaxValue;
- for (int i = 0; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v < r) r = v;
- }
- return r;
- }
-
- ///
- /// Invokes a transform function on each element of a sequence and returns the maximum value.
- ///
- /// A sequence of values to determine the maximum value of.
- /// A transform function to apply to each element.
- /// The maximum value in the transform of the sequence.
- public static TResult MinF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- if (source.Count == 0)
- {
- throw Error.NoElements();
- }
-
- Comparer comparer = Comparer.Default;
- TResult r = default(TResult);
- if (r == null)
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (v != null && comparer.Compare(v, r) < 0) r = v;
- }
- }
- else
- {
- r = selector(source[0]);
- for (int i = 1; i < source.Count; i++)
- {
- var v = selector(source[i]);
- if (comparer.Compare(v, r) < 0) r = v;
- }
- }
- return r;
- }
-
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Min.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Min.cs.meta
deleted file mode 100644
index 160ec1524..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Min.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: e778ffbe0914c7c4e88564ff2ba27fff
-timeCreated: 1518622478
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/OrderBy.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/OrderBy.cs
deleted file mode 100644
index 80b344c64..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/OrderBy.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-using System;
-using System.Collections.Generic;
-using JM.LinqFaster.Utils;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
- ///
- /// Sorts the elements of a sequence in ascending order according to a key.
- /// Unlike standard Linq NOT a stable sort.
- ///
- /// A sequence of values to order.
- /// A function to extract a key from an element.
- /// A Comparer to compare keys.
- /// A sequence whose alements are ordered according to a key
- public static TSource[] OrderByF(this TSource[] source, Func keySelector,IComparer comparer = null)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (keySelector == null)
- {
- throw Error.ArgumentNull("keySelector");
- }
-
- if (comparer == null)
- {
- comparer = Comparer.Default;
- }
-
- var keys = new TKey[source.Length];
- for (int i = 0; i < keys.Length; i++)
- {
- keys[i] = keySelector(source[i]);
- }
- var result = (TSource[])source.Clone();
- Array.Sort(keys,result,comparer);
- return result;
- }
-
- ///
- /// Sorts the elements of a sequence in descending order according to a key.
- /// Unlike standard Linq NOT a stable sort.
- ///
- /// A sequence of values to order.
- /// A function to extract a key from an element.
- /// A Comparer to compare keys.
- /// A sequence whose alements are ordered according to a key
- public static TSource[] OrderByDescendingF(this TSource[] source, Func keySelector, IComparer comparer = null) {
- if (source == null) {
- throw Error.ArgumentNull("source");
- }
-
- if (keySelector == null) {
- throw Error.ArgumentNull("keySelector");
- }
-
- if (comparer == null) {
- comparer = Comparer.Default;
- }
-
- var keys = new TKey[source.Length];
- for (int i = 0; i < keys.Length; i++) {
- keys[i] = keySelector(source[i]);
- }
- var result = (TSource[])source.Clone();
- Array.Sort(keys, result, comparer.Reverse());
- return result;
- }
-
-
- // ---------------------- Lists
-
- ///
- /// Sorts the elements of a sequence in ascending order according to a key.
- /// Unlike standard Linq NOT a stable sort.
- ///
- /// A sequence of values to order.
- /// A function to extract a key from an element.
- /// A Comparer to compare keys.
- /// A sequence whose alements are ordered according to a key
- public static List OrderByF(this List source, Func keySelector, IComparer comparer = null)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (keySelector == null)
- {
- throw Error.ArgumentNull("keySelector");
- }
-
- if (comparer == null)
- {
- comparer = Comparer.Default;
- }
-
- var result = new List(source);
- var lambdaComparer = new LambdaComparer(keySelector, comparer);
- result.Sort(lambdaComparer);
- return result;
- }
-
- ///
- /// Sorts the elements of a sequence in descending order according to a key.
- /// Unlike standard Linq NOT a stable sort.
- ///
- /// A sequence of values to order.
- /// A function to extract a key from an element.
- /// A Comparer to compare keys.
- /// A sequence whose alements are ordered according to a key
- public static List OrderByDescendingF(this List source, Func keySelector, IComparer comparer = null) {
- if (source == null) {
- throw Error.ArgumentNull("source");
- }
-
- if (keySelector == null) {
- throw Error.ArgumentNull("keySelector");
- }
-
- if (comparer == null) {
- comparer = Comparer.Default;
- }
-
- var result = new List(source);
- var lambdaComparer = new ReverseLambdaComparer(keySelector, comparer);
- result.Sort(lambdaComparer);
- return result;
- }
-
-
-
- }
-}
-
-
-
-
-
-
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/OrderBy.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/OrderBy.cs.meta
deleted file mode 100644
index 2635b634f..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/OrderBy.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 0905671e8837b8746ab9d2540689f16c
-timeCreated: 1518622476
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Range.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Range.cs
deleted file mode 100644
index 9599a3e3b..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Range.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
- ///
- /// Generates a sequence of integral numbers within a specified range.
- ///
- /// The value of the first integer in the sequence.
- /// The number of sequential integers to generate.
- /// A sequence that contains a range of sequential integral numbers.
- public static int[] RangeArrayF(int start, int count)
- {
- long max = ((long)start) + count - 1;
- if (count < 0 || max > int.MaxValue)
- {
- throw Error.ArgumentOutOfRange("count");
- }
-
-
- int[] result = new int[count];
- for (int i = 0; i < result.Length; i++)
- {
- result[i] = i + start;
- }
- return result;
-
- }
-
-
- ///
- /// Generates a sequence of integral numbers within a specified range.
- ///
- /// The value of the first integer in the sequence.
- /// The number of sequential integers to generate.
- /// A sequence that contains a range of sequential integral numbers.
- public static List RangeListF(int start, int count)
- {
- long max = ((long)start) + count - 1;
- if (count < 0 || max > int.MaxValue)
- {
- throw Error.ArgumentOutOfRange("count");
- }
-
-
- var result = new List(count);
- for (int i = 0; i < count; i++)
- {
- result.Add(i + start);
- }
- return result;
- }
-
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Range.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Range.cs.meta
deleted file mode 100644
index 5aa97552a..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Range.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 2b57c73286e4b784a897b514585dcdc2
-timeCreated: 1518622476
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Repeat.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Repeat.cs
deleted file mode 100644
index dee933986..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Repeat.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
- // ------------------------ Arrays ---------------------------
-
- ///
- /// Generates a sequence that contains one repeated value.
- ///
- /// The value to be repeated.
- /// The number of times to repeat the value in the generated sequence.
- /// A sequence that contains a repeated value
- public static T[] RepeatArrayF(T element, int count)
- {
- var result = new T[count];
- for (int i = 0; i < result.Length; i++)
- {
- result[i] = element;
- }
- return result;
- }
-
- // ------------------------ Lists ---------------------------
-
- ///
- /// Generates a sequence that contains one repeated value.
- ///
- /// The value to be repeated.
- /// The number of times to repeat the value in the generated sequence.
- /// A sequence that contains a repeated value
- public static List RepeatListF(T element, int count)
- {
- var result = new List(count);
- for (int i = 0; i < count; i++)
- {
- result.Add(element);
- }
- return result;
- }
-
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Repeat.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Repeat.cs.meta
deleted file mode 100644
index d89b50ca9..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Repeat.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: a9a067c2d04a41e499adfde8c8ab6956
-timeCreated: 1518622477
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Reverse.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Reverse.cs
deleted file mode 100644
index 3b8b3fcc6..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Reverse.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
- ///
- /// Inverts the order of the elements in a sequence.
- ///
- /// A sequence of values to reverse.
- /// A sequence whose elements correspond to those of the input sequence in reverse order.
- public static T[] ReverseF(this T[] source)
- {
- var result = new T[source.Length];
- long lenLessOne = source.Length - 1;
- for (int i = 0; i < result.Length; i++)
- {
- result[i] = source[lenLessOne - i];
- }
- return result;
- }
-
-
- ///
- /// Inverts the order of the elements in a sequence in place.
- ///
- /// A sequence of values to reverse.
- public static void ReverseInPlaceF(this T[] source)
- {
- Array.Reverse(source);
- }
-
- ///
- /// Inverts the order of the elements in a sequence.
- ///
- /// A sequence of values to reverse.
- /// A sequence whose elements correspond to those of the input sequence in reverse order.
- public static List ReverseF(this List source)
- {
- var result = new List(source.Count);
- for (int i = source.Count - 1; i >= 0; i--)
- {
- result.Add(source[i]);
- }
- return result;
- }
-
- ///
- /// Inverts the order of the elements in a sequence in place.
- ///
- /// A sequence of values to reverse.
- public static void ReverseInPlaceF(this List source)
- {
- source.Reverse();
- }
- }
-}
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Reverse.cs.meta b/Assets/Scripts/ServerShared/NIH/LinqFaster/Reverse.cs.meta
deleted file mode 100644
index 26f1c7810..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Reverse.cs.meta
+++ /dev/null
@@ -1,13 +0,0 @@
-fileFormatVersion: 2
-guid: 060a1817dc4b6a14997095dfc23c4d3b
-timeCreated: 1518622476
-licenseType: Free
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/ServerShared/NIH/LinqFaster/Select.cs b/Assets/Scripts/ServerShared/NIH/LinqFaster/Select.cs
deleted file mode 100644
index 60178ed7d..000000000
--- a/Assets/Scripts/ServerShared/NIH/LinqFaster/Select.cs
+++ /dev/null
@@ -1,219 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-
-namespace JM.LinqFaster
-{
- public static partial class LinqFaster
- {
-
- // -------------------------- ARRAYS --------------------------------------------
-
- ///
- /// Projects each element of a sequence into a new form in place.
- ///
- /// A sequence of values to invoke a transform function on (map).
- /// A transform function to apply (map) to each element.
- public static void SelectInPlaceF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- for (int i = 0; i < source.Length; i++)
- {
- source[i] = selector(source[i]);
- }
- }
-
- ///
- /// Projects each element of a sequence into a new form, in place, by incorporating the element's index.
- ///
- /// A sequence of values to invoke a transform function on.
- /// A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
- public static void SelectInPlaceF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- for (int i = 0; i < source.Length; i++)
- {
- source[i] = selector(source[i], i);
- }
- }
-
-
- ///
- /// Projects each element of a sequence into a new form. (map in every other language)
- ///
- /// A sequence of values to invoke a transform function on (map).
- /// A transform function to apply (map) to each element.
- /// A sequence whose elements are the result of invoking the transform function on each element (mapping) of source.
- public static TResult[] SelectF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- var r = new TResult[source.Length];
- for (int i = 0; i < source.Length; i++)
- {
- r[i] = selector(source[i]);
- }
- return r;
- }
-
-
-
- ///
- /// Projects each element of a sequence into a new form by incorporating the element's index.
- ///
- /// A sequence of values to invoke a transform function on.
- /// A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
- /// A sequence whose elements are the result of invoking the transform function on each element of source.
- public static TResult[] SelectF(this T[] source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
- var r = new TResult[source.Length];
- for (int i = 0; i < source.Length; i++)
- {
- r[i] = selector(source[i], i);
- }
- return r;
- }
-
- // -------------------------- LISTS --------------------------------------------
-
- ///
- /// Projects each element of a sequence into a new form in place.
- ///
- /// A sequence of values to invoke a transform function on (map).
- /// A transform function to apply (map) to each element.
- public static void SelectInPlaceF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- for (int i = 0; i < source.Count; i++)
- {
- source[i] = selector(source[i]);
- }
- }
-
- ///
- /// Projects each element of a sequence into a new form, in place, by incorporating the element's index.
- ///
- /// A sequence of values to invoke a transform function on.
- /// A transform function to apply to each source element; the second parameter of the function represents the index of the source element.
- public static void SelectInPlaceF(this List source, Func selector)
- {
- if (source == null)
- {
- throw Error.ArgumentNull("source");
- }
-
- if (selector == null)
- {
- throw Error.ArgumentNull("selector");
- }
-
- for (int i = 0; i < source.Count; i++)
- {
- source[i] = selector(source[i], i);
- }
- }
-
-
- ///
- /// Projects each element of a sequence into a new form. (map in every other language)
- ///
- /// A sequence of values to invoke a transform function on (map).
- /// A transform function to apply (map) to each element.
- /// A sequence whose elements are the result of invoking the transform function on each element (mapping) of source.
- public static List SelectF(this List