| 626 | // test setFromSortedTriplets / insertFromSortedTriplets |
| 627 | |
| 628 | struct triplet_comp { |
| 629 | inline bool operator()(const TripletType& a, const TripletType& b) { |
| 630 | return SparseMatrixType::IsRowMajor ? ((a.row() != b.row()) ? (a.row() < b.row()) : (a.col() < b.col())) |
| 631 | : ((a.col() != b.col()) ? (a.col() < b.col()) : (a.row() < b.row())); |
| 632 | } |
| 633 | }; |
| 634 | |
| 635 | // stable_sort is only necessary when the reduction functor is dependent on the order of the triplets |
| 636 | // this is the case with refMat_last |