Esempio n. 1
0
        public static double GetScale(ExampleBase exampleBase, double minSequentialExecutionTime)
        {
            Example    example = Get(exampleBase.GetType().ToString());
            DoublePair pair    = example.Get(exampleBase, minSequentialExecutionTime);

            return(pair.Value);
        }
Esempio n. 2
0
 public DoublePair(DoublePair other) : this(NQuantLibcPINVOKE.new_DoublePair__SWIG_2(DoublePair.getCPtr(other)), true)
 {
     if (NQuantLibcPINVOKE.SWIGPendingException.Pending)
     {
         throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Esempio n. 3
0
        public override DoublePair GetDelta()
        {
            Now = DateTime.Now.Ticks;
            DoublePair d = DoublePair.FromTicks((Now - Start) * X, (Now - Start) * Y);

            Start = DateTime.Now.Ticks;;
            return(d);
        }
Esempio n. 4
0
            public DoublePair Get(ExampleBase exampleBase, double minSequentialExecutionTime)
            {
                foreach (DoublePair doublePair in AppropriateScales)
                {
                    if (doublePair.Key == minSequentialExecutionTime)
                    {
                        return(doublePair);
                    }
                }

                DoublePair result = new DoublePair();

                result.Key   = minSequentialExecutionTime;
                result.Value = findGoodSize(exampleBase, minSequentialExecutionTime);

                AppropriateScales.Add(result);

                return(result);
            }
Esempio n. 5
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DoublePair obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Esempio n. 6
0
 public void Setup()
 {
     _sut = new DoublePair();
 }
Esempio n. 7
0
 public override DoublePair GetDelta()
 {
     return(DoublePair.From1000((Now - Start) * X, (Now - Start) * Y));
 }