Ok, ithink i have to be more specific. In my previous thread there is a description of the problem.Suppose the code:
the first step is:
Code:
for (i=0; i< instance->n_cols; i++) {
k[i] = (covers[i].size() / c[i]
}
The second step:
Code:
for (i=1; i< instance->n_cols; i++) {
k[i] = (covers[i].size() - ?????) / c[i]
}
vectors to use(members of a class) :
Code:
map<int,vector<int> > covered_by;// columns that cover a row
map<int,vector<int> > covers; // rows that covers a column
map<int,bool> is_covered; // if a row is covered
What i'm looking for is that (?????) term which indicates the number of rows that have been covered( and there are also covered by this column) and how can i determine the # of steps. Then i have to pick up the max of k[i] and add the corresponding column to a set. I hope that i'm a bit more clear now.
Thanx!