def testSummingGraphs(mergeFiles): print('\n--TESTS FOR ADDING NODE/EDGE LABEL VALUES') for ( file1, file2 ) in mergeFiles: print('\n[ Merging ' + file1 + ' and ' + file2 + ']') lg1 = Lg(file1) lg2 = Lg(file2) lg1.addWeightedLabelValues(lg2) print(lg1) print(lg1.csv()) print('-- with graph weights 0.25 and 0.75') lg1 = Lg(file1) lg1.gweight = 0.25 lg2 = Lg(file2) lg2.gweight = 0.75 lg1.addWeightedLabelValues(lg2) print(lg1) print(lg1.csv())
def testMaxLabel(mergeFiles): print('\n--TESTS FOR SELECTING MAX. VALUE LABELS') for ( file1, file2 ) in mergeFiles: print('\n[ Selecting max labels from combined ' + file1 + \ ' and ' + file2 + ']') lg1 = Lg(file1) lg2 = Lg(file2) lg1.addWeightedLabelValues(lg2) lg1.selectMaxLabels() print(lg1) print(lg1.csv()) print('-- with graph weights 0.25 and 0.75') lg1 = Lg(file1) lg1.gweight = 0.25 lg2 = Lg(file2) lg2.gweight = 0.75 lg1.addWeightedLabelValues(lg2) lg1.selectMaxLabels() print(lg1) print(lg1.csv())