Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Auxiliary/DictionaryExtensions.cs @ 13792

Last change on this file since 13792 was 12503, checked in by aballeit, 9 years ago

#2283 added GUI and charts; fixed MCTS

File size: 659 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using Microsoft.Research.DynamicDataDisplay.Charts.Isolines;
6
7namespace Microsoft.Research.DynamicDataDisplay.Common.Auxiliary
8{
9  internal static class DictionaryExtensions
10  {
11    internal static void Add<TKey, TValue>(this Dictionary<TKey, TValue> dict, TValue value, params TKey[] keys)
12    {
13      foreach (var key in keys)
14      {
15        dict.Add(key, value);
16      }
17    }
18
19    internal static void Add(this Dictionary<int, Edge> dict, Edge value, params CellBitmask[] keys)
20    {
21      foreach (var key in keys)
22      {
23        dict.Add((int)key, value);
24      }
25    }
26  }
27}
Note: See TracBrowser for help on using the repository browser.