Esempio n. 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);
 }
Esempio n. 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();
 }
Esempio n. 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();
 }
Esempio n. 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();
 }
Esempio n. 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]);
 }
Esempio n. 6
0
 public override bool Has(RiskFactorKey key)
 {
     return(_data.ContainsKey(key));
 }