Tuple#
-
class Tuple#
Represents a tuple.
Constructors
Constructors for Tuple objects.
-
inline AMPL_TUPLE *impl() const#
Get access to the inner immutable object (infrastructure).
-
inline Tuple(Variant arguments[], std::size_t N)#
Construct a n-Tuple from an array of variants.
-
inline ~Tuple()#
Destructor.
Constructors from variants
Constructors from ampl::Variant objects.
-
inline Tuple(Variant v1)#
-
inline Tuple(Variant v1, Variant v2)#
-
inline Tuple(Variant v1, Variant v2, Variant v3)#
-
inline Tuple(Variant v1, Variant v2, Variant v3, Variant v4)#
Construct tuples from variants.
- Parameters:
v1 – First element
v2 – Second element
v3 – Third element
v4 – Fourth element
Public Functions
-
inline explicit Tuple(AMPL_TUPLE *other)#
Construct a tuple from an internal struct (infrastructure).
-
inline std::size_t size() const#
Get the number of Elements in this tuple.
-
inline std::string toString() const#
Return a string representation of this tuple.
All elements are formatted as in BasicVariant::toString and comma separated. An empty tuple is returned as “()”.
-
inline Variant operator[](std::size_t index) const#
Accessor for elements of the tuple.
-
inline AMPL_TUPLE *impl() const#