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

Method SparseTensor

cpp/src/arrow/sparse_tensor.cc:444–455  ·  view source on GitHub ↗

Constructor with all attributes

Source from the content-addressed store, hash-verified

442
443// Constructor with all attributes
444SparseTensor::SparseTensor(const std::shared_ptr<DataType>& type,
445 const std::shared_ptr<Buffer>& data,
446 const std::vector<int64_t>& shape,
447 const std::shared_ptr<SparseIndex>& sparse_index,
448 const std::vector<std::string>& dim_names)
449 : type_(type),
450 data_(data),
451 shape_(shape),
452 sparse_index_(sparse_index),
453 dim_names_(dim_names) {
454 ARROW_CHECK(is_tensor_supported(type->id()));
455}
456
457const std::string& SparseTensor::dim_name(int i) const {
458 static const std::string kEmpty = "";

Callers

nothing calls this directly

Calls 2

is_tensor_supportedFunction · 0.85
idMethod · 0.45

Tested by

no test coverage detected