File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -545,9 +545,7 @@ shared<DegreeMatrix<T>> Graph<T>::getDegreeMatrix() const {
545
545
const std::vector<std::pair<shared<const Node<T>>, shared<const Edge<T>>>>
546
546
&neighbors = nodePair.second ;
547
547
548
- int degree = (int )neighbors.size ();
549
-
550
- (*degreeMatrix)[node] = {degree};
548
+ (*degreeMatrix)[node] = neighbors.size ();
551
549
}
552
550
553
551
return degreeMatrix;
Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ using AdjacencyMatrix = std::unordered_map<
249
249
250
250
template <typename T>
251
251
using DegreeMatrix =
252
- std::unordered_map<shared<const Node<T>>, std::vector< int > , nodeHash<T>>;
252
+ std::unordered_map<shared<const Node<T>>, unsigned int , nodeHash<T>>;
253
253
254
254
template <typename T>
255
255
using LaplacianMatrix = std::unordered_map<
You can’t perform that action at this time.
0 commit comments