llz80
December 1st, 2011, 10:09 PM
I have two files
file1:
query times attributes
q1 345 a1,a2
q2 547 a1,a4,a5
q5 967 a1
file2:
solution q1 q2 q3 q4 q5
s1 3425 1346 758 2245 928
s2 145 243 2983 1890 899
s3 333 209 1779 230 902
desire output:
query solution attributes
q1 s2 a1,a2
q2 s3 a1,a4,a5
q5 s2 a1
I want to select the solution with the least cost for each query in file1
Thanks for any help on this
file1:
query times attributes
q1 345 a1,a2
q2 547 a1,a4,a5
q5 967 a1
file2:
solution q1 q2 q3 q4 q5
s1 3425 1346 758 2245 928
s2 145 243 2983 1890 899
s3 333 209 1779 230 902
desire output:
query solution attributes
q1 s2 a1,a2
q2 s3 a1,a4,a5
q5 s2 a1
I want to select the solution with the least cost for each query in file1
Thanks for any help on this