MW UNITY NAMESPACE








































public sealed class <T> : MArray, IEnumerable<T>

MArray


A dynamic generic array combining the functionality of a List and a Dictionary.



public int

Num

The number of T in this MArray; the size.


CONSTRUCTOR ()

Summary:

Initialises an MArray with the default settings.


CONSTRUCTOR (int InitialSize)

Summary:

Initialises an MArray with an initial capacity.

Params:

InitialSize:

        The number of elements this MArray will begin with.



public void

Push (T Item)

Summary:

Adds Item.

Params:

Item:

        The unique element to add.



public void

Push (T[] Items)

Summary:

Adds a number of Items.

Params:

Items:

        The list of elements to add.



public int

Pull (T Item)

Summary:

Removes the most recent push of Item.

Remarks:

If you plan to Pull every element from the MArray, see PullAll(T).

Params:

Item:

        The element to remove.

Returns:

The new size of this MArray, or kInvalid if Item doesn't exist.



public int

PullAll (T Item)

Summary:

Removes all occurrences of Item.

Params:

Item:

        The item to remove.

Returns:

The new size of this MArray, or kInvalid if Item doesn't exist.



public int

Pull (T[] Items)

Summary:

Conducts a single Pull operation on every T item.

Params:

Items:

        The most recent push of each Item to pull.

Returns:

The new size of this MArray, or kInvalid if Item doesn't exist. Returns Num if Length of Items is 0.



public T

PullAtIndex (int Index)

Summary:

Pulls an Item from an Index.

Params:

Index:

        The Index to pull from.

Returns:

The pulled T from Index.



public MArray

PullMultiIndex (int[] Indices)

Summary:

Pull from multiple indices.

Params:

Indices:

        The index positions to remove.

Returns:

An MArray of the removed elements.



public static void

Copy (MArray<T> Destination, MArray<T> Source, int Start, int Num)

Summary:

Copies Num elements from an MArray to another MArray from Start.

Params:

Destination:

        The MArray that will be copied *into*.

Source:

        The MArray that will be copied *from*.

Start:

        The index from Source to begin copying into Destination.

Num:

        The number of elements to copy into Destination.



public T

Random ()

Summary:

Any element.

Returns:

Any random element.



public AccessedData

Access (T Item)

Summary:

Accesses data specific to this Item in the MArray.

Params:

Item:

        The Item to access its data.

Returns:

Accessed Data Occurrences and Positions, or AccessedData.None if this MArray does not have Item.



public int

FirstIndexOf (T Item)

Summary:

The index of the first occurrence of Item; index of Item's Earliest Push.

Params:

Item:

        The Item to search for.

Returns:

Zero-indexed position, if found. Otherwise, kInvalid.



public int

LastIndexOf (T Item)

Summary:

The index of the last occurrence of Item; index of Item's Latest Push.

Params:

Item:

        The Item to search for.

Returns:

Zero-indexed position, if found. Otherwise, kInvalid.



public T

First ()

Returns:

The item at the front of the queue.



public T

FirstPop ()

Summary:

Pops the item at the front of the queue.

Returns:

The item that was at the front of the queue.



public T

Top ()

Returns:

The item at the top of the stack.



public T

TopPop ()

Summary:

Pops the item at the top of the stack.

Returns:

The item at the top of the stack.



public bool

InRange (int Index)

Summary:

Whether or not Index is within range.

Params:

Index:

        The Index to check for range.

Returns:

If this MArray is not empty Index is greater than or equal to zero and less than the number of elements.



public bool

Contains (T Item)

Params:

Item:

        Item to check for existence.

Returns:

Whether the HashCode of Item exists within the internal HashMap.



public void

Flush ()

Summary:

Clears this MArray.



public bool

IsEmpty ()

Returns:

If this MArray is considered empty; Num == 0.



public T

Mirror ()

Returns:

The mirror position of index over minimum zero, maximum Num.



public T

Mirror ()

Returns:

The mirror position of index over Minimum to maximum Num.



public Reflected

Reflect ()

Summary:

The incoming and reflected Item of this mirror from zero to maximum Num.

Returns:

Source and Reflected information.



public Reflected

Reflect ()

Summary:

The incoming and reflected Item of this mirror from Minimum to maximum Num.

Returns:

Source and Reflected information.



public void

Reflect ()

Summary:

Reflects over Minimum, Maximum with Index.

Returns:

Outs the incoming and reflected Item of this mirror of Minimum, maximum Num.



public void

Sort ()

Summary:

Sorts Items.



public void

Sort (int Index, int Count, IComparer<T> Comparer)

Summary:

Sorts Items from Index for Count using Comparer.



public void

Sort (Comparison<T> Comparison)

Summary:

Sorts Items with a Comparison.



public void

Sort (IComparer<T> Comparer)

Summary:

Sorts Items with an IComparer.



public void

Reverse ()

Summary:

Reverses Items.



public void

Reverse (int Index, int Count)

Summary:

Reverses Items from Index for Count.



public string

Print (bool bWithIndex, string Separator)

Summary:

Every Item in this MArray represented as a string with object.ToString().

Remarks:

Assumes that T has a readable ToString() defined.

Params:

bWithIndex:

        Should the resulting string include the index of every item?

Separator:

        The string that will separate each element.

Returns:

A string form of all T.



public T[]

TArray ()

Summary:

This MArray as T[].

Returns:

T[].



public List

LArray ()

Summary:

This MArray as List

Returns:

List



public T

Item (int i)

Summary:

Square bracket accessor.

Params:

i:

        The index to access T item.

Returns:

The Item at the specified index.



public static bool operator!

operator! (MArray<T> CheckIfNull)

Summary:

If this MArray is null.

Params:

CheckIfNull:

        The MArray to check whether it is uninitialised.

Returns:

True if CheckIfNull is null.



public static MArray<T> operator+

operator+ (MArray<T> Left, MArray<T> Right)

Summary:

Adds Right to the end of Left.

Params:

Left:

        The MArray to append to.

Right:

        The MArray to append to Left.

Returns:

A contiguous MArray from Left to Right.



public static MArray<T> operator&

operator& (MArray<T> Left, MArray<T> Right)

Summary:

Left elements that exist in Right.

Params:

Left:

        The MArray to check AND.

Right:

        The MArray to compare to.

Returns:

An MArray of Left elements that also exist in Right.



public static MArray<T> operator^

operator^ (MArray<T> Left, MArray<T> Right)

Summary:

Left elements that do not exist in Right.

Params:

Left:

        The MArray to check OR.

Right:

        The MArray to compare to.

Returns:

An MArray of Left's elements that do not exist in Right.


public struct

Reflected


The incoming and reflected Item of this mirror over the provided Minimum and Maximum Num.



public T

Source

In reflection.



public T

Reflection

Out reflection.


public class

MArray


The base class for an MArray.


kInvalid

Definition of an invalid position or illegal number associated with an MArray.



public static bool

CheckNull (MArray Check)

Params:

Check:

        The MArray to check for initialisation.

Returns:

True if Check is null.


public struct

AccessedData


Data of an Item in an MArray.



public static readonly AccessedData

None

No data available.



public int

Occurrences

The number of times an Item appears in an MArray.



public int[]

Positions

The index locations of this Item in an MArray.

The array order from left to right is Latest Push to Earliest Push.



public bool

IsNone ()

Summary:

Data containing whether or not an accessed item has data associated with it.

Returns:

Whether or not an accessed item exists within an MArray{T}.