Пример #1
0
 public PolynomialLeastSquares(Behaviors.PointSelector.CompressedPointSelectorWrapper selector)
     : base(selector)
 {
     
     _coefs = MathNet.Numerics.Fit.Polynomial(selector.Select(x => (double)x.Value).ToArray(), selector.Select(x => (double)x.Rcs).ToArray(),
         selector.Count() - 1);
 }
Пример #2
0
        public LinearLeastSquares(Behaviors.PointSelector.CompressedPointSelectorWrapper selector) : base(selector)
        {


            var points = selector.Select(x => new PointF(x.Value, x.Rcs));

            //var ps = MathNet.Numerics.Fit.Polynomial(selector.Select(x => (double)x.Value).ToArray(), selector.Select(x => (double)x.Rcs).ToArray(),
            //    selector.Count(), MathNet.Numerics.LinearRegression.DirectRegressionMethod.NormalEquations);

            //var p = MathNet.Numerics.LinearRegression.SimpleRegression.Fit(selector.Select(x => (double)x.Value).ToArray(), selector.Select(x => (double)x.Rcs).ToArray());

            _slope = SlopeOfPoints(points); //(float)p.Item2;
            _yIntercept = YInterceptOfPoints(points, _slope); //(float)p.Item1;
        }
 public IAnimatedBehavior Remapping(Dictionary <QualifiedAnimation, AnimationClip> remapping, Dictionary <BlendTree, BlendTree> blendRemapping)
 {
     return(new ComplexMassiveBlendAnimatedBehavior(Behaviors.Select(behavior => behavior.Remapping(remapping, blendRemapping)).ToList(), OriginalBlendTreeTemplate));
 }