rsvs3D  0.0.0
Codes for the c++ implementation of the 3D RSVS
arraystructures.cpp
1 #include "arraystructures.hpp"
2 
3 #include <functional>
4 #include <iostream>
5 #include <sstream>
6 #include <stdexcept>
7 
8 using namespace std;
9 // Implementation of features
10 
11 bool CompareFuncOut(function<void()> func1, function<void()> func2)
12 {
13  bool compFlag;
14  stringstream ss1, ss2;
15  auto old_buf = cout.rdbuf(ss1.rdbuf());
16 
17  func1();
18  cout.rdbuf(ss2.rdbuf());
19  func2();
20  std::cout.rdbuf(old_buf);
21 
22  compFlag = ss1.str().compare(ss2.str()) == 0;
23  return (compFlag);
24 }
Provide std::vector container with hashed index mapping.