PPL Assignment
IRM2015006
|
#include "../couples/couple.h"
#include "../boys/allboys.h"
#include "../girls/allgirls.h"
#include <algorithm>
#include "logger/logger.h"
Go to the source code of this file.
Functions | |
std::vector< Couple > | makeCouples (std::vector< Boy * > boys, std::vector< Girl * > girls, Logger *logger) |
std::vector< Couple > | makeCouplesAlternatively (std::vector< Boy * > boys, std::vector< Girl * > girls, Logger *logger) |
void | performGifting (std::vector< Couple > *couples, std::vector< Gift > *giftlist, Logger *logger) |
void | performGifting2 (std::vector< Couple > *couples, std::vector< Gift > *giftlist, Logger *logger) |
std::vector< Couple > | getKHappiestCouples (std::vector< Couple > couples, int k) |
std::vector< Couple > | getKCompatibleCouples (std::vector< Couple > couples, int k) |
std::vector< Couple > | getKUnhappiestCouples (std::vector< Couple > couples, int k) |
std::vector< Couple > | getCouplesWithHappinessLessThan (std::vector< Couple >couples, int t) |
void | performBreakupAndPairAgain (std::vector< Couple >happyCouples, std::vector< Couple > *couples, std::vector< Boy * > *boys, std::vector< Girl * > *girls, Logger *logger) |
void | performBreakupOnHappinessAndPairAgain (std::vector< Couple > sadCouples, std::vector< Couple > *couples, std::vector< Boy * > *boys, std::vector< Girl * > *girls, int t, Logger *logger) |
Find couples with happiness less than t Solver for question 6
Definition at line 178 of file couple_utils.h.
Find the list of k most compatible couples from given list of couples
Returns the vector of compatible couples in descending order
Definition at line 157 of file couple_utils.h.
Find the list of k happiest couples from given list of couples
Returns the vector of happiest couples in descending order
Definition at line 147 of file couple_utils.h.
Find the list of k unhappiest couples from given list of couples
Returns the vector of happiest couples in descending order
Definition at line 167 of file couple_utils.h.
std::vector<Couple> makeCouples | ( | std::vector< Boy * > | boys, |
std::vector< Girl * > | girls, | ||
Logger * | logger | ||
) |
Form couples from given list of boys and girls
Returns the vector of couples formed
Definition at line 14 of file couple_utils.h.
std::vector<Couple> makeCouplesAlternatively | ( | std::vector< Boy * > | boys, |
std::vector< Girl * > | girls, | ||
Logger * | logger | ||
) |
Form couples from given list of boys and girls
Returns the vector of couples formed
Definition at line 58 of file couple_utils.h.
void performBreakupAndPairAgain | ( | std::vector< Couple > | happyCouples, |
std::vector< Couple > * | couples, | ||
std::vector< Boy * > * | boys, | ||
std::vector< Girl * > * | girls, | ||
Logger * | logger | ||
) |
Perform breakup of given couples and assign the girls new boyfriends Solver for 4
Definition at line 193 of file couple_utils.h.
void performBreakupOnHappinessAndPairAgain | ( | std::vector< Couple > | sadCouples, |
std::vector< Couple > * | couples, | ||
std::vector< Boy * > * | boys, | ||
std::vector< Girl * > * | girls, | ||
int | t, | ||
Logger * | logger | ||
) |
Perform breakup of couples with happiness less that t and assign the girls new boyfriends Solver for 4
Definition at line 252 of file couple_utils.h.
void performGifting | ( | std::vector< Couple > * | couples, |
std::vector< Gift > * | giftlist, | ||
Logger * | logger | ||
) |
Perform gifting for all these couples
Definition at line 129 of file couple_utils.h.
void performGifting2 | ( | std::vector< Couple > * | couples, |
std::vector< Gift > * | giftlist, | ||
Logger * | logger | ||
) |
Perform gifting for all these couples : second algorithm Solver for ques 8
Definition at line 138 of file couple_utils.h.