Skip to content

Commit

Permalink
[style] change some var name.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunelFeng committed Oct 5, 2024
1 parent 194edc1 commit 01ef709
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/GraphCtrl/GraphElement/_GOptimizer/GMaxParaOptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ class GMaxParaOptimizer : public GOptimizer {
CSize maxCliqueSize = 0; // 最大团size
std::vector<CSize> curClique; // 当前团

std::function<void(CSize, CSize)> backtrace = [&](CSize start, CSize depth) {
std::function<void(CSize, CSize)> backtrace = [&](CSize start, CSize curCliqueSize) {
for (CSize i = start; i < eleSize; i++) {
if (depth + eleSize - i <= maxCliqueSize) { return; } // 剪枝策略:剩余的元素数量,已经不足以超过 max 值了
if (curCliqueSize + eleSize - i <= maxCliqueSize) { return; } // 剪枝策略:剩余的元素数量,已经不足以超过 max 值了

if (std::all_of(curClique.begin(), curClique.end(), [&](const int j) {
// 如果跟当前团的node,均为连接状态,则标记为可以进入当前团中
return 1 == graph[j][i];
})) {
curClique.push_back(i);
backtrace(i + 1, depth + 1); // depth 表示,团里已有元素的个数
backtrace(i + 1, curCliqueSize + 1); // depth 表示,团里已有元素的个数
curClique.pop_back();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/UtilsCtrl/UtilsDefine.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ CVoid __ASSERT_NOT_NULL_THROW_EXCEPTION(T t, Args... args) {

#define CGRAPH_DELETE_PTR_ARRAY(arr) \
if (unlikely((arr) != nullptr)) { \
delete[] arr; \
delete[] (arr); \
(arr) = nullptr; \
} \
\
Expand Down

0 comments on commit 01ef709

Please sign in to comment.