File tree Expand file tree Collapse file tree
include/osp/graph_implementations/eigen_matrix_adapter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,8 +72,11 @@ class EigenCSRRange {
7272 return temp;
7373 }
7474
75- bool operator ==(const Iterator &other) const {return it_ == other.it_ ;}
76- bool operator !=(const Iterator &other) const { return not (*this == other);}
75+ inline bool operator ==(const Iterator &other) const {
76+ return (it_ && other.it_ && it_.index () == other.it_ .index ()) || ((not it_) && (not other.it_ ));
77+ }
78+
79+ inline bool operator !=(const Iterator &other) const { return not (*this == other); }
7780 };
7881
7982 EigenCSRRange (const Graph &graph, EigenIdxType idx) : graph_(graph), index_(idx) {}
@@ -132,8 +135,11 @@ class EigenCSCRange {
132135 return temp;
133136 }
134137
135- bool operator ==(const Iterator &other) const {return it_ == other.it_ ;}
136- bool operator !=(const Iterator &other) const { return not (*this == other);}
138+ inline bool operator ==(const Iterator &other) const {
139+ return (it_ && other.it_ && it_.index () == other.it_ .index ()) || ((not it_) && (not other.it_ ));
140+ }
141+
142+ inline bool operator !=(const Iterator &other) const { return not (*this == other); }
137143 };
138144
139145 EigenCSCRange (const Graph &graph, EigenIdxType idx) : graph_(graph), index_(idx) {}
You can’t perform that action at this time.
0 commit comments