Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected network dynamics example for issue CodeQL Analysis fails due to a compilation error on example #474 #477

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ build/
# ignore the packaging folder contents from git
packaging/
# ignore vscode files
.vscode
.vscode
.code-workspace
CXXGraph.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
Loading