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

Method Equals

cpp/src/arrow/sparse_tensor.cc:423–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421std::string SparseCSFIndex::ToString() const { return std::string("SparseCSFIndex"); }
422
423bool SparseCSFIndex::Equals(const SparseCSFIndex& other) const {
424 auto eq = [](const auto& a, const auto& b) { return a->Equals(*b); };
425// TODO: remove the use of std::equal when we no longer have partial C++20 support with
426// CRAN.
427#if defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 201911L
428 return axis_order() == other.axis_order() &&
429 std::ranges::equal(indices(), other.indices(), eq) &&
430 std::ranges::equal(indptr(), other.indptr(), eq);
431#else
432 return axis_order() == other.axis_order() &&
433 std::equal(indices().begin(), indices().end(), other.indices().begin(),
434 other.indices().end(), eq) &&
435 std::equal(indptr().begin(), indptr().end(), other.indptr().begin(),
436 other.indptr().end(), eq);
437#endif
438}
439
440// ----------------------------------------------------------------------
441// 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