I am making a pair matching project for school. Right now I'm a little stuck and was seeking help.
I've created 100 profiles, 50 males and 50 females with random attributes. I separated the profiles by gender using vectors. Now I have to create a vector of pairs and score each matching pair with a score. In the end, I should have a total of 2,500 possible pairings (males can only pair with females). Each profile is a struct with attributes and each attribute has a score.
I am not sure how to create a vector of pairs, assign every possible pairing to it, and then assign a score to each pair. Any help is appreciated.
**this is just an example**
struct profile {
//this structure has profile attributes with each
//attribute having a score to it
class Match {
private:
std::vector<profile> _males;
std::vector<profile> _females;
std::vector<std::pair<profile, profile> _pairs;
// _maxProfiles will create the total number of profiles
int _maxProfiles = 100;
int _maleProfiles = _maxProfiles/2;
int _femaleProfiles = _maxProfiles/2;
I don't know whether you want any comment on yours or not. However, and it's a bit of a guess on my part, you can probably get away with just one vector of pairs and simply sort and filter that one which makes it more reliable and avoids duplication. All you would have is a set of queries of the single base dataset of pairs. (it would even be good to eliminate the need for the vector of pairs but I can't see how that could be done at a quick glance)