Example #1
0
        private IHSExplicitVectorValue <HSEdgeState> __performStepOperation(int stepCount)
        {
            for (int i = 0; i < stepCount; i++)
            {
                _currentStep = __step(_currentStep, _recurrenceVector, _hs);
            }

            return(_currentStep);
        }
Example #2
0
        private void __initializeMath()
        {
            _hs = this.CompileHilbertSpace();
            var hsVector = IHSExplicitVector <HSEdgeState> .ArbitraryVector(_hs, "hs");

            var op = IHSExplicitVector <HSEdgeState> .CreateLinearOperator(__qwStepFunction, "step");

            _recurrenceVector = (IHSExplicitVectorValue <HSEdgeState>)hsVector.ApplyOperator(op);
        }
Example #3
0
        private IHSExplicitVectorValue <HSEdgeState> __step(
            IHSExplicitVectorValue <HSEdgeState> stateVector,
            IHSExplicitVectorValue <HSEdgeState> walkedVector,
            IEnumerable <HSEdgeState> hs)
        {
            MathContext context = new MathContext();

            foreach (var state in hs)
            {
                context["hs", state] = stateVector[state];
            }

            return((IHSExplicitVectorValue <HSEdgeState>)walkedVector.Evaluate(context));
        }