Hi guys
I have this code
Code:
while (timer.elapsed_time(Timer::VIRTUAL) < tmax) {
.
.
.
.
cout << " value " << aSol->value() <<"\ttime " << timer.elapsed_time(Timer::VIRTUAL) << endl;
.
.
}
where while the time is smaller than tmax( a value that i put) prints some values.What i want is to print the smallest value of them. I thought of using min_element but i don't know how and i don't know if it is the right way.Just to help the value is defined like this
Code:
class Solution {
public:
Solution();
Solution(SC_instance* my_instance);
~Solution();
SC_instance* instance;
vector<int> selected_columns;
map<int,bool> is_covered;
map<int,bool> is_added;
int obj_value;
int n_covered;
int value();
void add_column(int i);
void rmv_column(int i);
bool is_complete();
};
If you want any other information please ask me.
Thanks a lot