Class AbstractCOOTensor

Inheritance Relationships

Base Type

Class Documentation

class AbstractCOOTensor : public mindspore::abstract::AbstractUndetermined

Class AbstractCOOTensor describes a COOTensor’s abstract value.

Public Functions

inline explicit AbstractCOOTensor(const AbstractBasePtr &element, const BaseShapePtr &shape = std::make_shared<Shape>())

Constructor of AbstractCOOTensor.

Parameters
  • element[in] The abstract which is wrapped to be the abstract value of COOTensor.

  • shape[in] The dimension of the abstract.

inline AbstractCOOTensor(const TypePtr &element_type, const ShapeVector &shape)

Constructor of AbstractCOOTensor.

Parameters
  • element_type[in] The type of COOTensor.

  • shape[in] The dimension of COOTensor.

~AbstractCOOTensor() override = default

Destructor of AbstractCOOTensor.

inline  MS_DECLARE_PARENT (AbstractCOOTensor, AbstractUndetermined) const AbstractTensorPtr indices() const

Get the indices of COOTensor.

Returns

A pointer to the abstract tensor.

inline void set_indices(const AbstractTensorPtr &indices)

Set the indices for the abstract.

Parameters

indices[in] The indices.

inline const AbstractTensorPtr values() const

Get the values.

Returns

A pointer to the abstract tensor.

inline void set_values(const AbstractTensorPtr &values)

Set the values.

Parameters

values[in] The values of COOTensor.

inline const AbstractTuplePtr dense_shape() const

Get the dense shape.

Returns

A pointer to the tuple of abstracts.

inline void set_dense_shape(const AbstractTuplePtr &dense_shape)

Set the dense shape.

Parameters

dense_shape[in] The dense shape of COOTensor.

virtual TypePtr BuildType() const override

Build the type of the abstract.

Note

Use this function to get the actual type, while track type is not enough accurate.

Returns

A pointer to the Type.

virtual AbstractBasePtr Clone() const override

Clone an abstract from the abstract.

Returns

A pointer to the cloned abstract.

virtual AbstractBasePtr Broaden() const override

Broaden the abstract. It will upgrade the abstract to a higher level.

Returns

A pointer to the broadened abstract.

AbstractBasePtr BroadenWithShape() const

Broaden the abstract with the shape not changing.

Returns

A pointer to the broadened abstract.

virtual std::string ToString() const override

Get the string representation of this object.

Returns

The string representation.