本文整理汇总了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: