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

Function isCanonical

cpp/src/generated/SparseTensor_generated.h:178–180  ·  view source on GitHub ↗

This flag is true if and only if the indices matrix is sorted in row-major order, and does not have duplicated entries. This sort order is the same as of Tensorflow's SparseTensor, but it is inverse order of SciPy's canonical coo_matrix (SciPy employs column-major order for its coo_matrix).

Source from the content-addressed store, hash-verified

176 /// but it is inverse order of SciPy's canonical coo_matrix
177 /// (SciPy employs column-major order for its coo_matrix).
178 bool isCanonical() const {
179 return GetField<uint8_t>(VT_ISCANONICAL, 0) != 0;
180 }
181 bool Verify(::flatbuffers::Verifier &verifier) const {
182 return VerifyTableStart(verifier) &&
183 VerifyOffsetRequired(verifier, VT_INDICESTYPE) &&

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected