Example #1
0
 private OutrightSwap(string curve_, PointDef def_)
 {
   m_point = def_;
   CurveName = curve_;
   PointDefs = new[] { def_ };
   m_1 = xYyY.Get(CurveName, m_point);
 }
Example #2
0
 private CurveSwap(string curveName_, PointDef CD_, PointDef AB_)
 {
   m_CD = CD_;
   m_AB = AB_;
   CurveName = curveName_;
   PointDefs = new[] {AB_, CD_};
   m_cdImpl = xYyY.Get(CurveName, m_CD);
   m_abImpl = xYyY.Get(CurveName, m_AB);
 }
Example #3
0
 private ButterflySwap(string curvename_, PointDef w1_, PointDef belly_, PointDef w2_)
 {
   m_w1 = w1_; m_belly = belly_; m_w2 = w2_;
   CurveName = curvename_;
   PointDefs = new[] {w1_, belly_, w2_};
   m_bellyFrontImpl = xYyY.Get(CurveName, m_belly);
   m_w1FrontImpl = xYyY.Get(CurveName, m_w1);
   m_w2FrontImpl = xYyY.Get(CurveName, m_w2);
 }
Example #4
0
    public static xYyY Get(string curve_, int startYear_, int forwardYear_)
    {
      var key = GetKey(curve_, startYear_, forwardYear_);

      if (!_cache.ContainsKey(key))
        lock (_cache)
          if (!_cache.ContainsKey(key))
            _cache[key] = new xYyY(curve_, startYear_, forwardYear_);

      return _cache[key];
    }
Example #5
0
 public override void Dispose()
 {
   subToLive(false);
   m_cdImpl = null;
   m_abImpl = null;
   base.Dispose();
 }
Example #6
0
 public override void Dispose()
 {
   subToLive(false);
   m_bellyFrontImpl = null;
   m_w1FrontImpl = null;
   m_w2FrontImpl = null;
   base.Dispose();
 }