本文整理汇总了C++中Relation::deleteColumn方法的典型用法代码示例。如果您正苦于以下问题:C++ Relation::deleteColumn方法的具体用法?C++ Relation::deleteColumn怎么用?C++ Relation::deleteColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Relation
的用法示例。
在下文中一共展示了Relation::deleteColumn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: project
Relation Relation::project(std::vector<Parameter> params) {
Relation result = *this;
std::vector<std::string*> dups;
std::vector<uint> to_delete;
for (uint i = 0; i < params.size(); i++) {
auto param = params[i];
if (std::find(dups.begin(), dups.end(), ¶m.str) != dups.end()) {
to_delete.push_back(i);
} else if (param.type != ID) {
to_delete.push_back(i);
} else {
dups.push_back(¶m.str);
}
}
for (auto it = to_delete.end(); it > to_delete.begin(); it--)
result.deleteColumn(*it);
return result;
}