TripleArray<T1, T2, T3>

public class TripleArray<T1, T2, T3>
Maintains and synchronizes three arrays. Note: this is probably useless now that Tuples are part of the lang.spec.
T1
T2
T3

Constructors

TripleArray

#
public TripleArray()
Create a new, empty multi-array.

TripleArray

#
public TripleArray(IEnumerable<T1> t1Items, IEnumerable<T2> t2Items, IEnumerable<T3> t3Items)
Create a new multi-array from collections.
t1Items (IEnumerable<T1>)Collection of T1 items.
t2Items (IEnumerable<T2>)Collection of T2 items.
t3Items (IEnumerable<T3>)Collection of T3 items.

TripleArray

#
public TripleArray(int capacity)
Create a new multi-array with a specified capacity.
capacity (int)

Properties

A

#
public Accessor<T1> A { get; }
Get access to the internal T1 array.

B

#
public Accessor<T2> B { get; }
Get access to the internal T2 array.

C

#
public Accessor<T3> C { get; }
Get access to the internal T3 array.

Capacity

#
public int Capacity { get; }
Gets the capacity for each array.

Count

#
public int Count { get; }
Gets the number of items stored in each array.

T1Items

#
public IEnumerable<T1> T1Items { get; }
Enumerate over all T1 items.

T2Items

#
public IEnumerable<T2> T2Items { get; }
Enumerate over all T2 items.

T3Items

#
public IEnumerable<T3> T3Items { get; }
Enumerate over all T3 items.

Methods

Add

#
public void Add(T1 a, T2 b, T3 c)
Add a pair to this multi array.
a (T1)A value.
b (T2)B value.
c (T3)C value.

Clear

#
public void Clear()
Clear the array.

EnsureCapacity

#
public void EnsureCapacity(int capacity)
Ensure the capacity of this multi-array is at least the given amount.
capacity (int)Required capacity.

FindT1

#
public int FindT1(T1 item, int startIndex)
Find the first occurence of a T1 item.
item (T1)Item to find.
startIndex (int)First index to take into account.
First index of matching item or -1.

FindT1

#
public int FindT1(T1 item)
Find the first occurence of a T1 item.
item (T1)Item to find.
First index of matching item or -1.

FindT2

#
public int FindT2(T2 item, int startIndex)
Find the first occurence of a T2 item.
item (T2)Item to find.
startIndex (int)First index to take into account.
First index of matching item or -1.

FindT2

#
public int FindT2(T2 item)
Find the first occurence of a T2 item.
item (T2)Item to find.
First index of matching item or -1.

FindT3

#
public int FindT3(T3 item, int startIndex)
Find the first occurence of a T3 item.
item (T3)Item to find.
startIndex (int)First index to take into account.
First index of matching item or -1.

FindT3

#
public int FindT3(T3 item)
Find the first occurence of a T3 item.
item (T3)Item to find.
First index of matching item or -1.

Remove

#
public void Remove(int index)
Remove the values at the given index.
index (int)Index to remove.

ToT1Array

#
public T1[] ToT1Array()
Copy the internal T1 array into a new array.
T1 items.

ToT2Array

#
public T2[] ToT2Array()
Copy the internal T2 array into a new array.
T2 items.

ToT3Array

#
public T3[] ToT3Array()
Copy the internal T3 array into a new array.
T3 items.

TrimExcess

#
public void TrimExcess()
Release unused memory.