Skip to content
Snippets Groups Projects
Commit b5f563a1 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add access to the number of nodes of the graph

parent 2ce513d0
No related branches found
No related tags found
1 merge request!11Feature/mpi
...@@ -10,6 +10,12 @@ class CSRGraph ...@@ -10,6 +10,12 @@ class CSRGraph
Array<int> m_neighbors; Array<int> m_neighbors;
public: public:
size_t numberOfNodes() const
{
Assert(m_entries.size()>0);
return m_entries.size()-1;
}
const Array<int>& entries() const const Array<int>& entries() const
{ {
return m_entries; return m_entries;
...@@ -28,7 +34,7 @@ class CSRGraph ...@@ -28,7 +34,7 @@ class CSRGraph
: m_entries(entries), : m_entries(entries),
m_neighbors(neighbors) m_neighbors(neighbors)
{ {
; Assert(m_entries.size()>0);
} }
CSRGraph() = default; CSRGraph() = default;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment