Ejemplo n.º 1
0
        /// <summary>
        /// 清除非坐标的信息。同时清理对应的矩阵。
        /// </summary>
        /// <param name="solutionValues"></param>
        /// <param name="matrixBlock"></param>
        public static void CleanNonCoordSolutionValue(ICollectionBlock <SolutionValue> solutionValues, SolutionMatrixBlock matrixBlock)
        {
            if (solutionValues == null || solutionValues.Items == null || solutionValues.Items.Count == 0)
            {
                return;
            }

            List <int> tobeRemoveIndexes = new List <int>();
            int        index             = 0;

            foreach (var item in solutionValues.Items)
            {
                if (item.ParameterType != ParameterType.STAX &&
                    item.ParameterType != ParameterType.STAY &&
                    item.ParameterType != ParameterType.STAZ)
                {
                    tobeRemoveIndexes.Add(index);
                }
                index++;
            }

            for (int i = tobeRemoveIndexes.Count - 1; i >= 0; i--)
            {
                solutionValues.Items.RemoveAt(tobeRemoveIndexes[i]);
            }

            //清理对应的矩阵
            if (matrixBlock == null || matrixBlock.Items.Count == 0)
            {
                return;
            }
            double[][] matrix        = SinexMatrixConvertor.GetMatrix(matrixBlock.Items);
            double[][] cleanedMatrix = MatrixUtil.ShrinkMatrix(matrix, tobeRemoveIndexes);

            //更新
            matrixBlock.Items = SinexMatrixConvertor.GetMatrixLines(cleanedMatrix);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 估值协方差阵。
 /// </summary>
 /// <returns></returns>
 public double[][] GetEstimateCovaMatrix()
 {
     return(SinexMatrixConvertor.GetMatrix(SolutionMatrixEstimateCova.Items));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 法方程系数阵
 /// </summary>
 /// <returns></returns>
 public double[][] GetNormalEquationMatrix()
 {
     return(SinexMatrixConvertor.GetMatrix(this.SolutionNormalEquationMatrix.Items));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 得到先验协方差阵。
 /// </summary>
 /// <returns></returns>
 public double[][] GetAprioriCovaMatrix()
 {
     return(SinexMatrixConvertor.GetMatrix(SolutionMatrixAprioriCova.Items));
 }