Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Data structure for matching attributes?

Name: Anonymous 2012-10-26 11:16

I need a data structure and data storage solution that is optimal for the following scenario:

Storing: >20M sets of attributes. Each set is of variable length. None are empty.
Matching: An inputted set with all the other stored sets. Comparing and contrasting attributes. Returning the most favorable matched sets.

I don't know where to start.

Name: Anonymous 2012-10-26 11:40

Name: Anonymous 2012-10-26 11:49

[C]
const int NIGGERS =1000;
const int BEARD_BODY =1000;
const int INCOME_LEVEL=20;

bool(*comp)(Possible_Boyfriend,Possible_Boyfriend)=
//Your function to compare boys.

typedef TreeSet<Possible_Boyfriend,bool(*)(Possible_Boyfriend,Possible_Boyfriend)>(comp)[NIGGERS][BEAR_BODY][INCOME_LEVEL] lovePot;

[/C]

Enjoy! please not sepples a sjhit....,,  ..

Name: Proactive Communication 2012-10-26 11:56

>>2
That was ENTERPRISE quality!

Name: Anonymous 2012-10-26 12:03

>>4
>.<
Oh My G why des this place codetags doesn't work!?!!!♥?
Person me*=MyRoom.getMe();
me->SetFurious("very");

Roaaar, what tha fuck, who designed this shit that donest't even recognize code tags, seriosly wtf men.
me->goAway("the bar");

System.out.cout<<Place.parsePlace(me.where()).toString();

Name: Anonymous 2012-10-26 14:21

Keep the attributes in a bloom filter per set and then just calculate Hamming distances between the target bit vector and that of each of the sets. Works acceptably if you have a lot of attributes per set but not that many sets.
If you do have a lot of sets and they're distributed fairly normally, it may be possible to enumerate all bit vectors within Hamming distance x (where x is maybe 1 or 2) of the target vector and locate them more efficiently, possibly with a fallback to the other algorithm if you have an empty result set.

The real answer is to use an ENTERPRISE TURKEY SOLUTION and make it someone else's problem. That's only feasible if someone else is paying and you have no interest in knowing how shit works, though.

Name: Anonymous 2012-10-26 17:05

Read SICP.

Name: Anonymous 2012-10-26 17:39

Assuming there's a partial ordering with respect to fitness, have some O(n):


best = NULL;
while(t=set->next)
    best = better(t, best) ? t : best;

Name: Anonymous 2012-10-26 18:47

>>8
Genius.

Don't change these.
Name: Email:
Entire Thread Thread List