MCPcopy Create free account
hub / github.com/apache/arrow / Equals

Method Equals

cpp/src/arrow/sparse_tensor.cc:407–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405std::string SparseCSFIndex::ToString() const { return std::string("SparseCSFIndex"); }
406
407bool SparseCSFIndex::Equals(const SparseCSFIndex& other) const {
408 auto eq = [](const auto& a, const auto& b) { return a->Equals(*b); };
409// TODO: remove the use of std::equal when we no longer have partial C++20 support with
410// CRAN.
411#if defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 201911L
412 return axis_order() == other.axis_order() &&
413 std::ranges::equal(indices(), other.indices(), eq) &&
414 std::ranges::equal(indptr(), other.indptr(), eq);
415#else
416 return axis_order() == other.axis_order() &&
417 std::equal(indices().begin(), indices().end(), other.indices().begin(),
418 other.indices().end(), eq) &&
419 std::equal(indptr().begin(), indptr().end(), other.indptr().begin(),
420 other.indptr().end(), eq);
421#endif
422}
423
424// ----------------------------------------------------------------------
425// SparseTensor

Callers

nothing calls this directly

Calls 7

equalFunction · 0.85
indicesFunction · 0.85
SparseTensorEqualsFunction · 0.85
axis_orderMethod · 0.80
indicesMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected