Class AbstractList

Inheritance Relationships

Base Type

Class Documentation

class AbstractList : public mindspore::abstract::AbstractSequence

Class AbstractList describes a list.

Public Functions

inline explicit AbstractList(AbstractBasePtrList &&elements, const std::shared_ptr<AnfNodeWeakPtrList> &list_nodes = nullptr)

Constructor of AbstractList.

Parameters
  • elements[in] A list of abstracts.

  • list_node[in] The nodes of list, usually are MakeList CNodes or list ValueNodes.

inline explicit AbstractList(const AbstractBasePtrList &elements, const std::shared_ptr<AnfNodeWeakPtrList> &list_nodes = nullptr)

Constructor of AbstractList.

Parameters
  • elements[in] A list of abstracts.

  • list_node[in] The nodes of list, usually are MakeList CNodes or list ValueNodes.

~AbstractList() override = default

Destructor of AbstractList.

inline virtual BaseShapePtr BuildShape() const override

Build the shape of the abstract.

Note

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

Returns

A pointer to the BaseShape.

inline virtual AbstractBasePtr Clone() const override

Clone an abstract from the abstract.

Returns

A pointer to the cloned abstract.

inline virtual AbstractBasePtr Broaden() const override

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

Returns

A pointer to the broadened abstract.

inline virtual AbstractBasePtr PartialBroaden() const override

Broaden abstract with constraints.

Returns

A pointer to the broadened abstract.

inline virtual AbstractBasePtr Join(const AbstractBasePtr &other) override

Combine two abstracts. If two abstracts are different, it will broaden the abstract value.

Parameters

other[in] The other abstract to be joined.

Returns

A pointer to the combined abstract.