Exemple #1
0
        public StochasticManifoldPoint Apply(IManifoldPoint point, double time)
        {
            var state = new State(point);

            var basePoint  = _baseProcess.Apply(state.BasePoint, time);
            var fiberPoint = FiberEvolution(state, basePoint, time);

            var answerExpectation = new ProductManifold.Point(basePoint.Expectation, fiberPoint.Point.Expectation);

            var answerCovariance = new SymmetricMatrix(_stateSpace.Dimension);

            answerCovariance.SetSubmatrix(0, basePoint.Covariance);
            answerCovariance.SetSubmatrix(_baseProcess.StateSpace.Dimension, fiberPoint.Point.Covariance);
            answerCovariance.SetSubmatrix(_baseProcess.StateSpace.Dimension, 0, fiberPoint.MixedCovariance);

            return(new StochasticManifoldPoint(answerExpectation, answerCovariance));
        }
        public StochasticManifoldPoint Apply(IManifoldPoint point, double time)
        {
            var productPoint = (ProductManifold.Point)point;

            var answerFactors    = new List <IManifoldPoint>(_factors.Count);
            var answerCovariance = new SymmetricMatrix(_stateSpace.Dimension);

            for (int i = 0; i < _factors.Count; i++)
            {
                var stochasticFactor = _factors[i].Apply(productPoint.Factors[i], time);

                answerFactors.Add(stochasticFactor.Expectation);
                answerCovariance.SetSubmatrix(_stateSpace.CoordinateIndex(i), stochasticFactor.Covariance);
            }

            return(new StochasticManifoldPoint(new ProductManifold.Point(answerFactors.AsReadOnlyList()), answerCovariance));
        }