|
Emotiv Experimenter 1.0
An EEG experimentation application for the Emotiv headset
|
Provides general-purpose extension methods. More...
Static Public Member Functions | |
| static double | StandardDeviation (this IEnumerable< double > enumerable, out double mean) |
| Computes the mean and standard deviation. | |
| static IEnumerable< double > | MovingAverages (this IEnumerable< double > enumerable, double alpha) |
| Computes the exponentially-smoothed moving average of the sequence. | |
| static void | ForEach< T > (this IEnumerable< T > enumerable, Action< T > action) |
| Performs the action on each item in the enumerable. | |
| static void | ForEach< T > (this IEnumerable< T > enumerable, Action< T, int > action) |
| Performs the action on each item in the enumerable as well as the item's index. | |
| static IEnumerable< T > | InOrder< T > (this IEnumerable< T > enumerable) |
| Returns the elements of the enumerable in sorted order. | |
| static IArrayView< int > | IndicesWhenOrderedBy< TSource, TKey > (this IEnumerable< TSource > enumerable, Func< TSource, TKey > keySelector) |
| The returned values represent how the indices of the current sequence would change after the sequence was sorted via the key selector. | |
| static T | Print< T > (this T obj) |
| Returns the object after printing it to standard output. | |
| static IEnumerable< T > | PrintAll< T > (this IEnumerable< T > enumerable) |
| Returns the enumerable after printing its elements. | |
| static IEnumerable< double > | AsDeltas (this IEnumerable< double > enumerable) |
| Returns the sequence of delta (change) values. | |
| static bool | IsEmpty< T > (this IEnumerable< T > items) |
| Checks whether the enumerable is empty in constant time. | |
| static string | ConcatToString< T > (this IEnumerable< T > items, char separator, string format=null) |
| Concatentates the items in the enumerable to a string, formatting them with the specified format string and separating them with the specified character. | |
| static string | ConcatToString< T > (this IEnumerable< T > items, string separator="", string format=null) |
| Concatentates the items in the enumerable to a string, formatting them with the specified format string and separating them with the specified string. | |
| static IEnumerable< T > | Then< T > (this IEnumerable< T > items, T nextItem) |
| Returns the sequence containing all of the elements in the enumerable followed by the specified item. | |
| static IEnumerable< T > | Then< T > (this T item, IEnumerable< T > nextItems) |
| Returns the sequence containing the specified item followed by the elements of the enumerable. | |
| static IEnumerable< T > | Then< T > (this T item, T nextItem) |
| Returns the sequence containing the specified item followed by the other specified item. | |
| static IEnumerable< T > | Enumerate< T > (this T item) |
| Returns a sequence containing only the specified item. | |
| static IEnumerable< T > | Concatenated< T > (this IEnumerable< IEnumerable< T >> enumerables) |
| Flattens the collection of enumerables into a single sequence. | |
| static double | SquaredDistanceTo (this IEnumerable< double > enumerable, IEnumerable< double > that) |
| Returns the square of the distance between the two vectors. | |
| static double | InnerProduct (this IEnumerable< double > enumerable, IEnumerable< double > that) |
| Returns the inner product of the two vectors. | |
| static double | AsFinite (this double value, double defaultValue=0) |
| Returns the value if it is not infinite or NaN, or the default value otherwise. | |
| static int | Rounded (this double val) |
| Rounds the double to an int. | |
| static double | ToDouble (this int val) |
| Casts the int to a double. | |
| static IEnumerable< double > | Cumsums (this IEnumerable< double > enumerable) |
| Return the cumulative sums of the vector. | |
| static int | Argmax< T > (this IEnumerable< T > enumerable) |
| Returns the index of the maximum element of the vector. | |
| static T | LastItem< T > (this T[] array) |
| Efficiently returns the last element in array. | |
| static T | LastItem< T > (this IList< T > list) |
| Efficiently returns the last element in list. | |
| static bool | NextBool (this Random rand) |
| Returns a random boolean value. | |
| static IArrayView< T > | Shuffled< T > (this IEnumerable< T > enumerable, Random randomToUse=null) |
| Returns an array whose contents are the contents of this enumerable in a random order. | |
| static IEnumerable< Duo< T, V > > | ParallelTo< T, V > (this IEnumerable< T > en1, IEnumerable< V > en2) |
| Enumerates over both sequences in parallel. | |
| static object | New (this Type type) |
| Uses reflection to instantiate a new object of type with no arguments. | |
| static IArrayView< Type > | GetImplementingTypes (this Type type, IEnumerable< Assembly > moreAssemblies=null) |
| Returns all types in the the types's assembly or in more assemblies which derive from type. Does not return interface or abstract types. | |
| static bool | TrySerializeToFile (this object obj, string path) |
| Returns true iff the object was successfully serialized the the specified file using a binary formatter. | |
| static string | Indent (this string toIndent, int depth=1, string indentString="\t") |
| Indents the string by adding the indent string depth number of times at the beginning and before each newline. | |
Provides general-purpose extension methods.
| static int System.Extensions.Argmax< T > | ( | this IEnumerable< T > | enumerable | ) | [static] |
Returns the index of the maximum element of the vector.
| T | : | IComparable<T> |
| static IEnumerable<double> System.Extensions.AsDeltas | ( | this IEnumerable< double > | enumerable | ) | [static] |
Returns the sequence of delta (change) values.
| static double System.Extensions.AsFinite | ( | this double | value, |
| double | defaultValue = 0 |
||
| ) | [static] |
Returns the value if it is not infinite or NaN, or the default value otherwise.
| static IEnumerable<T> System.Extensions.Concatenated< T > | ( | this IEnumerable< IEnumerable< T >> | enumerables | ) | [static] |
Flattens the collection of enumerables into a single sequence.
| static string System.Extensions.ConcatToString< T > | ( | this IEnumerable< T > | items, |
| char | separator, | ||
| string | format = null |
||
| ) | [static] |
Concatentates the items in the enumerable to a string, formatting them with the specified format string and separating them with the specified character.
| static string System.Extensions.ConcatToString< T > | ( | this IEnumerable< T > | items, |
| string | separator = "", |
||
| string | format = null |
||
| ) | [static] |
Concatentates the items in the enumerable to a string, formatting them with the specified format string and separating them with the specified string.
| static IEnumerable<double> System.Extensions.Cumsums | ( | this IEnumerable< double > | enumerable | ) | [static] |
Return the cumulative sums of the vector.
| static IEnumerable<T> System.Extensions.Enumerate< T > | ( | this T | item | ) | [static] |
Returns a sequence containing only the specified item.
| static void System.Extensions.ForEach< T > | ( | this IEnumerable< T > | enumerable, |
| Action< T, int > | action | ||
| ) | [static] |
Performs the action on each item in the enumerable as well as the item's index.
| static void System.Extensions.ForEach< T > | ( | this IEnumerable< T > | enumerable, |
| Action< T > | action | ||
| ) | [static] |
Performs the action on each item in the enumerable.
| static IArrayView<Type> System.Extensions.GetImplementingTypes | ( | this Type | type, |
| IEnumerable< Assembly > | moreAssemblies = null |
||
| ) | [static] |
Returns all types in the the types's assembly or in more assemblies which derive from type. Does not return interface or abstract types.
| static string System.Extensions.Indent | ( | this string | toIndent, |
| int | depth = 1, |
||
| string | indentString = "\t" |
||
| ) | [static] |
Indents the string by adding the indent string depth number of times at the beginning and before each newline.
| static IArrayView<int> System.Extensions.IndicesWhenOrderedBy< TSource, TKey > | ( | this IEnumerable< TSource > | enumerable, |
| Func< TSource, TKey > | keySelector | ||
| ) | [static] |
The returned values represent how the indices of the current sequence would change after the sequence was sorted via the key selector.
| static double System.Extensions.InnerProduct | ( | this IEnumerable< double > | enumerable, |
| IEnumerable< double > | that | ||
| ) | [static] |
Returns the inner product of the two vectors.
| static IEnumerable<T> System.Extensions.InOrder< T > | ( | this IEnumerable< T > | enumerable | ) | [static] |
Returns the elements of the enumerable in sorted order.
| T | : | IComparable<T> |
| static bool System.Extensions.IsEmpty< T > | ( | this IEnumerable< T > | items | ) | [static] |
Checks whether the enumerable is empty in constant time.
| static T System.Extensions.LastItem< T > | ( | this T[] | array | ) | [static] |
Efficiently returns the last element in array.
| static T System.Extensions.LastItem< T > | ( | this IList< T > | list | ) | [static] |
Efficiently returns the last element in list.
| static IEnumerable<double> System.Extensions.MovingAverages | ( | this IEnumerable< double > | enumerable, |
| double | alpha | ||
| ) | [static] |
Computes the exponentially-smoothed moving average of the sequence.
| static object System.Extensions.New | ( | this Type | type | ) | [static] |
Uses reflection to instantiate a new object of type with no arguments.
| static bool System.Extensions.NextBool | ( | this Random | rand | ) | [static] |
Returns a random boolean value.
| static IEnumerable<Duo<T, V> > System.Extensions.ParallelTo< T, V > | ( | this IEnumerable< T > | en1, |
| IEnumerable< V > | en2 | ||
| ) | [static] |
Enumerates over both sequences in parallel.
| static T System.Extensions.Print< T > | ( | this T | obj | ) | [static] |
Returns the object after printing it to standard output.
| static IEnumerable<T> System.Extensions.PrintAll< T > | ( | this IEnumerable< T > | enumerable | ) | [static] |
Returns the enumerable after printing its elements.
| static int System.Extensions.Rounded | ( | this double | val | ) | [static] |
Rounds the double to an int.
| static IArrayView<T> System.Extensions.Shuffled< T > | ( | this IEnumerable< T > | enumerable, |
| Random | randomToUse = null |
||
| ) | [static] |
Returns an array whose contents are the contents of this enumerable in a random order.
| static double System.Extensions.SquaredDistanceTo | ( | this IEnumerable< double > | enumerable, |
| IEnumerable< double > | that | ||
| ) | [static] |
Returns the square of the distance between the two vectors.
| static double System.Extensions.StandardDeviation | ( | this IEnumerable< double > | enumerable, |
| out double | mean | ||
| ) | [static] |
Computes the mean and standard deviation.
| static IEnumerable<T> System.Extensions.Then< T > | ( | this T | item, |
| T | nextItem | ||
| ) | [static] |
Returns the sequence containing the specified item followed by the other specified item.
| static IEnumerable<T> System.Extensions.Then< T > | ( | this IEnumerable< T > | items, |
| T | nextItem | ||
| ) | [static] |
Returns the sequence containing all of the elements in the enumerable followed by the specified item.
| static IEnumerable<T> System.Extensions.Then< T > | ( | this T | item, |
| IEnumerable< T > | nextItems | ||
| ) | [static] |
Returns the sequence containing the specified item followed by the elements of the enumerable.
| static double System.Extensions.ToDouble | ( | this int | val | ) | [static] |
Casts the int to a double.
| static bool System.Extensions.TrySerializeToFile | ( | this object | obj, |
| string | path | ||
| ) | [static] |
Returns true iff the object was successfully serialized the the specified file using a binary formatter.
1.7.3