def analyzeAllBenchmarksAreaOnly():
	for dataset in utils.benchmarks:
		(root, rectangles, dictionary, matrix) = initializeMatchPairs(dataset)
		anneal(dataset, annealingParameters,metrics.costArea)
		alignImages.createImages('Output/initialMatchPairs_','Output/annealing_','Output/Comparison of Initial to Annealed (area cost)_')

#analyzeAllBenchmarksAreaOnly()
def analyzeAllBenchmarks():
    for dataset in utils.benchmarks:
        # Initial Floorplan
        (root, rectangles, dictionary, matrix) = initializeMatchPairs(dataset)

        # Anneal - Consider area only
        anneal(dataset, annealingParameters, metrics.costArea,
               "Output/annealing_", 'Annealed Floorplan - Area Only')

        # Anneal - Consider area and connections
        length = len(rectangles)
        lambdas = copy(matrix)
        costParameters = classes.CostParameters(np.ones((length, length)), 0.5,
                                                1, lambdas, dictionary)

        # Curry cost function
        def newCost(inRoot):
            #return metrics.costWithLamdas(rectangles, costParameters)
            return metrics.costWithLamdasFromRoot(inRoot, costParameters)

        anneal(dataset, annealingParameters, newCost,
               "Output/annealingNewCost_",
               'Annealed Floorplan - Area and Connections')

    alignImages.createImages(
        'Output/initialMatchPairs_', 'Output/annealing_',
        'Output/annealingNewCost_',
        'Output/Comparison of Initial to Annealed (Area and All)_')
def analyzeAllBenchmarksAreaOnly():
    for dataset in utils.benchmarks:
        (root, rectangles, dictionary, matrix) = initializeMatchPairs(dataset)
        anneal(dataset, annealingParameters, metrics.costArea)
        alignImages.createImages(
            'Output/initialMatchPairs_', 'Output/annealing_',
            'Output/Comparison of Initial to Annealed (area cost)_')


#analyzeAllBenchmarksAreaOnly()