当前位置: 首页>>代码示例>>Python>>正文


Python PyXMCDA.getCategoriesComparisonsAllValues方法代码示例

本文整理汇总了Python中PyXMCDA.getCategoriesComparisonsAllValues方法的典型用法代码示例。如果您正苦于以下问题:Python PyXMCDA.getCategoriesComparisonsAllValues方法的具体用法?Python PyXMCDA.getCategoriesComparisonsAllValues怎么用?Python PyXMCDA.getCategoriesComparisonsAllValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyXMCDA的用法示例。


在下文中一共展示了PyXMCDA.getCategoriesComparisonsAllValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: import PyXMCDA [as 别名]
# 或者: from PyXMCDA import getCategoriesComparisonsAllValues [as 别名]

#.........这里部分代码省略.........
                    else:
                        RK[cid1][cid2] = ''
            missing_eval = False
            for cid1 in Knames:
                for cid2 in Knames:
                    if cid1 != cid2:
                        found = False
                        if cid1 in clustersRel:
                            if cid2 in clustersRel[cid1]:
                                found = True
                                RK[cid1][cid2] = clustersRel[cid1][cid2]
                                if clustersRel[cid1][cid2] == 'p+':
                                    RK[cid2][cid1] = 'p-'
                                elif clustersRel[cid1][cid2] == 'p-':
                                    RK[cid2][cid1] = 'p+'
                                else:
                                    RK[cid2][cid1] = clustersRel[cid1][cid2]
                        if not found and cid2 in clustersRel:
                            if cid1 in clustersRel[cid2]:
                                found = True
                                RK[cid2][cid1] = clustersRel[cid2][cid1]
                                if clustersRel[cid2][cid1] == 'p+':
                                    RK[cid1][cid2] = 'p-'
                                elif clustersRel[cid2][cid1] == 'p-':
                                    RK[cid1][cid2] = 'p+'
                                else:
                                    RK[cid1][cid2] = clustersRel[cid2][cid1]
                        if not found:
                            missing_eval = True
                            break
            if missing_eval:
                errorList.append("Incomplete clusters relations.")
                
            RKsum = PyXMCDA.getCategoriesComparisonsAllValues(xmltree_clustersRelationsDetailed, Knames)

            if not RKsum :
                errorList.append("Problems with detailed clusters relations.")
            missing_eval = False
            for k1 in Knames:
                if not (k1 in RKsum):
                    missing_eval = True
                    break
                else:
                    for k2 in Knames:
                        if not (k2 in RKsum[k1]):
                            missing_eval = True
                            break
                        else:
                            if not ('i' in RKsum[k1][k2]):
                                missing_eval = True
                                break
                            if not ('p+' in RKsum[k1][k2]):
                                missing_eval = True
                                break
                            if not ('p-' in RKsum[k1][k2]):
                                missing_eval = True
                                break
                            if not ('j' in RKsum[k1][k2]):
                                missing_eval = True
                                break
            if missing_eval:
                errorList.append("Incomplete clusters relations summary.")

        if not errorList :
            PC = PlotClusters(alternativesId, alternativesRel, Knames, K, RK, RKsum)
            try:
开发者ID:aolteanu,项目名称:ws-Mcc,代码行数:70,代码来源:mccPlotClusters.py


注:本文中的PyXMCDA.getCategoriesComparisonsAllValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。