示例#1
0
文件: SparseGP.cs 项目: 0xCM/arrows
        /// <summary>
        /// Sets one sparse GP to another. Everything is copied
        /// except the FixedParameters and the lsit of rank 1 potentials
        /// which are referenced.
        /// </summary>
        /// <param name="that">The sparse GP to copy</param>
        public void SetTo(SparseGP that)
        {
            fixedParameters = that.FixedParameters;
            InducingDist.SetTo(that.InducingDist);
            IncludePrior = that.IncludePrior;
            pointFunc    = that.pointFunc;

            if (that.alpha != null)
            {
                alpha = Vector.Copy(that.alpha);
            }
            else
            {
                alpha = null;
            }

            if (that.beta != null)
            {
                beta = new PositiveDefiniteMatrix(that.beta as Matrix);
            }
            else
            {
                beta = null;
            }

            if (that.meanB != null)
            {
                meanB = Vector.Copy(that.meanB);
            }
            else
            {
                meanB = null;
            }

            if (that.varBB != null)
            {
                varBB = new PositiveDefiniteMatrix(that.varBB as Matrix);
            }
            else
            {
                varBB = null;
            }
        }