from massey import analyzer from massey import group from massey import city from massey import visualizer if __name__ == "__main__": groups_no = [group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2)] groups_lo = [ group.Group("a", 320 * 3, .1), group.Group("a", 640 * 3, .1, 1), group.Group("b", 320 * 3, .2) ] groups_hi = [ group.Group("a", 640 * 3, .1), group.Group("a", 320 * 3, .1, 1), group.Group("b", 320 * 3, .2) ] groups_all = [group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2)] city_no = city.City(groups_no, 16) city_no.generate_uniform() city_no_seg = city.City(groups_no, 16) city_no_seg.generate_uniform_seg() city_lo = city.City(groups_lo, 16) city_lo.generate_mixed([[("a", 0)], [("a", 1), "b"]])
from massey import analyzer from massey import group from massey import city from massey import visualizer if __name__ == "__main__": groups_no = [ group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13) ] groups_lo = [ group.Group("a", 320 * 3, .1), group.Group("a", 640 * 3, .1, 1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13) ] groups_hi = [ group.Group("a", 640 * 3, .1), group.Group("a", 320 * 3, .1, 1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13) ] groups_all = [ group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13) ]
from massey import analyzer from massey import group from massey import city from massey import visualizer if __name__ == "__main__": groups_no = [group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13), group.Group("d", 160 * 3, .3), group.Group("d", 40 * 3, .3, 1)] groups_lo = [group.Group("a", 320 * 3, .1), group.Group("a", 640 * 3, .1, 1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13), group.Group("d", 40 * 3, .3), group.Group("d", 120 * 3, .3, 1), group.Group("d", 40 * 3, .3, 2)] groups_hi = [group.Group("a", 640 * 3, .1), group.Group("a", 320 * 3, .1, 1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13), group.Group("d", 80 * 3, .3), group.Group("d", 80 * 3, .3, 1), group.Group("d", 40 * 3, .3, 2)] groups_all = [group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2), group.Group("c", 320 * 3, .13),
from massey import analyzer from massey import group from massey import city from massey import visualizer if __name__ == "__main__": groups_no = [ group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2), group.Group("d", 160 * 3, .3) ] groups_lo = [ group.Group("a", 320 * 3, .1), group.Group("a", 640 * 3, .1, 1), group.Group("b", 320 * 3, .2), group.Group("d", 40 * 3, .3), group.Group("d", 120 * 3, .3, 1) ] groups_hi = [ group.Group("a", 640 * 3, .1), group.Group("a", 320 * 3, .1, 1), group.Group("b", 320 * 3, .2), group.Group("d", 80 * 3, .3), group.Group("d", 80 * 3, .3, 1) ] groups_all = [ group.Group("a", 960 * 3, .1), group.Group("b", 320 * 3, .2),
from massey import analyzer from massey import group from massey import city from massey import visualizer if __name__ == "__main__": groups0 = [group.Group("humans", 20, .5), group.Group("elves", 20, 0)] groups1 = [ group.Group("humans", 1800, .3), group.Group("elves", 600, 0), group.Group("orcs", 1200, .5) ] city0 = city.City(groups0, 5) city0.generate_segregated_seg() print(analyzer.entropy_index(city0, True)) # print(analyzer.entropy_score_city(city0, True)) # print(city0.generate_segregated()) city1 = city.City(groups1, 120) # print(city1.generate_uniform()) # print(city1.generate_segregated()) # print("") # print(city1.generate_mixed([["humans"], ["elves", "orcs"]])) # print(city1.generate_mixed_seg([["humans"], ["elves", "orcs"]])) city1.generate_mixed_seg([["humans"], ["elves", "orcs"]])