The following data structure is available:
std::vector< std::set<unsigned> > G; and class for comparison:
struct classcomp{ unsigned *ia; bool operator() (const int& a, const int& b) const { return (ia[a + 1] - ia[a])< (ia[b + 1] - ia[b]); } }; To compare this class you need to create an instance of the class:
classcomp C; C.ia = ia; But create then
std::vector< std::set<unsigned,C> > G; It is impossible, because the second parameter requires the name of the class, not its instance. Tell me how to get around this moment.