Constructor with all attributes
| 442 | |
| 443 | // Constructor with all attributes |
| 444 | SparseTensor::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 | |
| 457 | const std::string& SparseTensor::dim_name(int i) const { |
| 458 | static const std::string kEmpty = ""; |
nothing calls this directly
no test coverage detected