Template Class ExpandingArrayWithOptionalElem#
- Defined in File expanding_array.h 
Page Contents
Inheritance Relationships#
Base Type#
- public torch::ExpandingArray< D, std::optional< int64_t > >(Template Class ExpandingArray)
Class Documentation#
- 
template<size_t D, typename T = int64_t>
 class ExpandingArrayWithOptionalElem : public torch::ExpandingArray<D, std::optional<int64_t>>#
- A utility class that accepts either a container of - D-many- std::optional<T>values, or a single- std::optional<T>value, which is internally repeated- Dtimes.- It has the additional ability to accept containers of the underlying type - Tand convert them to a container of- std::optional<T>.- Public Functions - 
inline ExpandingArrayWithOptionalElem(std::initializer_list<T> list)#
- Constructs an - ExpandingArrayWithOptionalElemfrom an- initializer_listof the underlying type- T.- The extent of the length is checked against the - ExpandingArrayWithOptionalElem’s extent parameter- Dat runtime.
 - 
inline ExpandingArrayWithOptionalElem(std::vector<T> vec)#
- Constructs an - ExpandingArrayWithOptionalElemfrom an- std::vectorof the underlying type- T.- The extent of the length is checked against the - ExpandingArrayWithOptionalElem’s extent parameter- Dat runtime.
 - 
inline ExpandingArrayWithOptionalElem(c10::ArrayRef<T> values)#
- Constructs an - ExpandingArrayWithOptionalElemfrom an- c10::ArrayRefof the underlying type- T.- The extent of the length is checked against the - ExpandingArrayWithOptionalElem’s extent parameter- Dat runtime.
 - 
inline ExpandingArrayWithOptionalElem(T single_size)#
- Constructs an - ExpandingArrayWithOptionalElemfrom a single value of the underlying type- T, which is repeated- Dtimes (where- Dis the extent parameter of the- ExpandingArrayWithOptionalElem).
 - 
inline ExpandingArrayWithOptionalElem(const std::array<T, D> &values)#
- Constructs an - ExpandingArrayWithOptionalElemfrom a correctly sized- std::arrayof the underlying type- T.
 
- 
inline ExpandingArrayWithOptionalElem(std::initializer_list<T> list)#