示例#1
0
文件: Result.cs 项目: zxs1215/VBF
 internal StepResult(int cost, Func <Result <T> > nextResultFuture, ErrorCorrection errorCorrection)
     : base(ResultType.Step)
 {
     m_nextResultFuture = nextResultFuture;
     ErrorCorrection    = errorCorrection;
     Cost = cost;
 }
示例#2
0
文件: ParserContext.cs 项目: zgf/VBF
        public Result <T> StepResult <T>(int cost, Func <Result <T> > nextResult, ErrorCorrection errorCorrection)
        {
            //if (cost > 0)
            //{
            //    m_failedSteps++;

            //    if (m_failedSteps >= m_succeedSteps * 10)
            //    {
            //        m_trimmingThreshold = 0;
            //    }
            //    else if (m_failedSteps >= m_succeedSteps * 6)
            //    {
            //        m_trimmingThreshold = 1;
            //    }
            //}
            //else
            //{
            //    m_succeedSteps++;
            //}

            return(new StepResult <T>(cost, nextResult, errorCorrection));
        }