/// <summary>Takes the time of inserting items.</summary> /// <param name="k">The k.</param> /// <param name="t">The t.</param> public void InsertTime(KeyValuePair <K, T> item) { foreach (ICollection <KeyValuePair <K, T> > hashtable in HashTable) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); hashtable.Add(item); InsertDictionary.Add(hashtable, stopwatch); stopwatch.Stop(); } }
/// <summary>Takes the time of inserting items.</summary> /// <param name="t">The t.</param> public void InsertTime(T t) { foreach (ICollection <T> tree in Tree) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); tree.Add(t); InsertDictionary.Add(tree, stopwatch); stopwatch.Stop(); } }
/// <summary>Takes the time of inserting items of a list.</summary> /// <param name="kvp">The KVP.</param> public void InsertTime(List <KeyValuePair <K, T> > kvp) { foreach (ICollection <KeyValuePair <K, T> > hashtable in HashTable) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); foreach (var item in kvp) { hashtable.Add(item); } InsertDictionary.Add(hashtable, stopwatch); stopwatch.Stop(); } }
/// <summary>Takes the time of inserting items to a list.</summary> /// <param name="t">The t.</param> public void InsertTime(List <T> t) { foreach (ICollection <T> tree in Tree) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); foreach (var item in t) { tree.Add(item); } InsertDictionary.Add(tree, stopwatch); stopwatch.Stop(); } }
/// <summary>Takes the time of inserting items of a dictionary.</summary> /// <param name="dict">The dictionary.</param> public void InsertTime(Dictionary <K, T> dict) { foreach (ICollection <KeyValuePair <K, T> > hashtable in HashTable) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); foreach (var item in dict) { KeyValuePair <K, T> kvp = new KeyValuePair <K, T>(item.Key, item.Value); hashtable.Add(kvp); } InsertDictionary.Add(hashtable, stopwatch); stopwatch.Stop(); } }