For coverage, I've a set of run time variables of from my program execution. It happens that I get it from a series of executions(Automated testing). ie. its a vector<vector<var,value>>
I've a limited set of variables with expected values and generate combination s, that is I have vector<vector<var,value>(smaller than the execution vector)>
. Now I need to compare and tell which of the combination I generated were exactly executed in one of the tests.
My algo is O(n^4). Is there any way to bring it down. Something like set intersection. I'm using java, and vectors because of thread safety.
Eloboration: I have a very big chunk of variables in my program. I don't care about all of them. All I care about is a set of variables with values that I know abt them(Edge values,and developer given values). What I do is, generate a set of combinations for those variables with values, which i think might be meaningful since, it will be useful after an automated test, to tell me that these combinations were excecuted and some were not.
Since, the test is automated i have a series (<20) executions with all variables and values in the DS I gave in the question. My problem is comparing a small set of combinations with a large set. The Hash might work if the no. of variables are same, i suppose. My algo is brute force