Adjusting return types and main completion
This commit is contained in:
parent
3abc8a8491
commit
b6c266add0
Binary file not shown.
Binary file not shown.
BIN
build/libHLlib.a
BIN
build/libHLlib.a
Binary file not shown.
BIN
build/main
BIN
build/main
Binary file not shown.
@ -18,6 +18,7 @@ HL::HL()
|
||||
|
||||
void HL::print_sol()
|
||||
{
|
||||
auto sol = get_sol();
|
||||
for(auto itr = sol.begin(); itr != sol.end(); itr++)
|
||||
std::cout << "Line ID " << std::get<0>(*itr) << " visible in range (" <<
|
||||
std::get<0>(std::get<1>(*itr)) <<
|
||||
@ -85,8 +86,8 @@ std::set<Line> HL::gen_sol(std::set<Line>& ls){
|
||||
}
|
||||
|
||||
//return sol;
|
||||
std::set<Line> dummy;
|
||||
return dummy;
|
||||
//std::set<Line> dummy;
|
||||
//return dummy;
|
||||
}
|
||||
|
||||
std::set<Line> HL::construct_HWprob(){
|
||||
@ -156,8 +157,6 @@ std::set<Line> HL::get_lines() const{
|
||||
return lines;
|
||||
}
|
||||
|
||||
std::set<Line> HL::get_sol() const{
|
||||
std::set<Line> dummy;
|
||||
return dummy;
|
||||
//return sol;
|
||||
std::set<std::pair<int, std::pair<double, double>>> HL::get_sol() const{
|
||||
return sol;
|
||||
}
|
||||
@ -14,7 +14,7 @@ class HL
|
||||
std::set<Line> construct_HWprob();
|
||||
|
||||
std::set<Line> get_lines() const;
|
||||
std::set<Line> get_sol() const;
|
||||
std::set<std::pair<int, std::pair<double, double>>> get_sol() const;
|
||||
|
||||
private:
|
||||
//Solution is in form (Line ID, (vis_start, vis_end))
|
||||
|
||||
@ -21,6 +21,9 @@ int main(int argc, char *argv[])
|
||||
<< " and a y-intercept of " << line.get_ycept() << std::endl;
|
||||
}
|
||||
|
||||
std::set<Line> line_sol = inst.gen_sol(lines);
|
||||
std::cout << "Generating Solution." << std::endl;
|
||||
inst.gen_sol(lines);
|
||||
std::cout << "Solution is: " << std::endl;
|
||||
inst.print_sol();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user