本文整理汇总了C#中MathNet.Numerics.LinearAlgebra.Double.DenseMatrix.RemoveRow方法的典型用法代码示例。如果您正苦于以下问题:C# DenseMatrix.RemoveRow方法的具体用法?C# DenseMatrix.RemoveRow怎么用?C# DenseMatrix.RemoveRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MathNet.Numerics.LinearAlgebra.Double.DenseMatrix
的用法示例。
在下文中一共展示了DenseMatrix.RemoveRow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateFuzzyMatrix
/// <summary>
/// 计算模糊矩阵
/// </summary>
private void CalculateFuzzyMatrix()
{
MemberShipFun _memeberShipFun = new MemberShipFun();
for (int i = AHPIndexHierarchyUtil.totalLevelCount - 2; i >= 0; i--)
{
List<AHPIndexHierarchy> iLevelAhpIndexs = _ahpIndexUtil.FindbyLevel(i);
foreach (AHPIndexHierarchy _iLevelAhpIndex in iLevelAhpIndexs)
{
List<string> childrenNames = _iLevelAhpIndex.ChildrenNames;
DenseMatrix _iLevelMatrix = new DenseMatrix(childrenNames.Count, MemberShipFun.HealthLevelCount);
DenseVector _childrenValue = new DenseVector(childrenNames.Count);
for (int j = 0; j < childrenNames.Count; j++)
{
string name = childrenNames[j];
AHPIndexHierarchy _ahpIndex = _ahpIndexUtil.FindbyName(name);
if (i == AHPIndexHierarchyUtil.totalLevelCount - 2)//是底层
{
_ahpIndex.FuzzyValue = _memeberShipFun.TrapezoiMebership(_ahpIndex.IndexValue);
}
_iLevelMatrix = (DenseMatrix)_iLevelMatrix.InsertRow(j, _ahpIndex.FuzzyValue);
_iLevelMatrix = (DenseMatrix)_iLevelMatrix.RemoveRow(j + 1);
//_ahpIndex.ChildrenFuzzyMatrix = (DenseMatrix)_iLevelMatrix;
_childrenValue[j] = _ahpIndex.IndexValue;
}
_iLevelAhpIndex.ChildrenFuzzyMatrix = _iLevelMatrix;
_iLevelAhpIndex.IndexValue = _iLevelAhpIndex.ChildrenWeightVector * _childrenValue;
_iLevelAhpIndex.FuzzyValue = FuzzyOperator.WeightedAverage(_iLevelAhpIndex.ChildrenWeightVector, _iLevelAhpIndex.ChildrenFuzzyMatrix);
}
}
}