本文整理匯總了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: