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); }
/// <summary> /// Get an element from the scenario /// </summary> /// <param name="key"></param> /// <returns></returns> public virtual double Get(RiskFactorKey key) { throw new NotImplementedException(); }
/// <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(); }
/// <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(); }
public override double Get(RiskFactorKey key) { QLNet.Utils.QL_REQUIRE(_data.ContainsKey(key), () => "Scenario does not provide data for key " + key); return(_data[key]); }
public override bool Has(RiskFactorKey key) { return(_data.ContainsKey(key)); }