private IHSExplicitVectorValue <HSEdgeState> __performStepOperation(int stepCount) { for (int i = 0; i < stepCount; i++) { _currentStep = __step(_currentStep, _recurrenceVector, _hs); } return(_currentStep); }
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); }
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)); }