Skip to content

Commit

Permalink
Corrected network dynamics example for issue CodeQL Analysis fails du…
Browse files Browse the repository at this point in the history
…e to a compilation error on example #474
  • Loading branch information
ZigRazor committed Dec 2, 2024
1 parent 33dff88 commit 1e6b6f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ build/
# ignore the packaging folder contents from git
packaging/
# ignore vscode files
.vscode
.vscode
.code-workspace
5 changes: 2 additions & 3 deletions examples/NetworkDynamicsExample/network_dynamics_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ int main() {
auto degreeMatrix = graph.getDegreeMatrix();
for (const auto& nodePair : *degreeMatrix) {
const CXXGraph::shared<const CXXGraph::Node<int>>& node = nodePair.first;
const std::vector<int>& degrees = nodePair.second;
const unsigned int degree = nodePair.second;

std::cout << "Node: " << node->getId() << ", Degree: " << degrees[0]
<< "\n";
std::cout << "Node: " << node->getId() << ", Degree: " << degree << "\n";
}
auto laplacianMatrix = graph.getLaplacianMatrix();
for (const auto& nodePair : *laplacianMatrix) {
Expand Down

0 comments on commit 1e6b6f8

Please sign in to comment.