Пример #1
0
 public override void Add(RiskFactorKey key, double value)
 {
     _data[key] = value;
     // TODO: Do we need more logic as below?
     //if(find(keys_.begin(), keys_.end(), key) == keys_.end())
     //keys_.emplace_back(key);
 }
Пример #2
0
 /// <summary>
 /// Get an element from the scenario
 /// </summary>
 /// <param name="key"></param>
 /// <returns></returns>
 public virtual double Get(RiskFactorKey key)
 {
     throw new NotImplementedException();
 }
Пример #3
0
 /// <summary>
 /// Add an element to the scenario
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public virtual void Add(RiskFactorKey key, double value)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 /// <summary>
 /// Check whether this scenario provides the data for the given key
 /// </summary>
 /// <param name=""></param>
 /// <returns></returns>
 public virtual bool Has(RiskFactorKey key)
 {
     throw new NotImplementedException();
 }
Пример #5
0
 public override double Get(RiskFactorKey key)
 {
     QLNet.Utils.QL_REQUIRE(_data.ContainsKey(key), () => "Scenario does not provide data for key " + key);
     return(_data[key]);
 }
Пример #6
0
 public override bool Has(RiskFactorKey key)
 {
     return(_data.ContainsKey(key));
 }