Tuple#

class ampl.Tuple#

AMPL immutable tuple.

Public Functions

Tuple ()#
Tuple (int i)
Tuple (long i)
Tuple (double i)
Tuple (string i)
Tuple (params object[] objects)
override string ToString ()#

Returns a System.String that represents this instance.

override bool Equals (object obj)#

Determines whether the specified System.Object, is equal to this instance, implements deep comparison.

override int GetHashCode ()#

Returns a hash code for this instance.

Public Members

TupleBase inner#

Properties

int Size { get; set; }#

Gets the size (number of elements) of this tuple.

ampl.Variant this[int index] {get;set;}

Gets the ampl.Variant at the specified index.

Public Static Functions

Tuple FromTuple<T> (Tuple<T> tuple)#
Tuple FromTuple<T1, T2> (Tuple<T1, T2> tuple)
Tuple FromTuple<T1, T2, T3> (Tuple<T1, T2, T3> tuple)
Tuple FromTuple<T1, T2, T3, T4> (Tuple<T1, T2, T3, T4> tuple)
Tuple FromTuple<T1, T2, T3, T4, T5> (Tuple<T1, T2, T3, T4, T5> tuple)
Tuple FromTuple<T1, T2, T3, T4, T5, T6> (Tuple<T1, T2, T3, T4, T5, T6> tuple)
Tuple FromTuple<T1, T2, T3, T4, T5, T6, T7> (Tuple<T1, T2, T3, T4, T5, T6, T7> tuple)
Tuple[] FromArray (params object[] objects)#

Create an array of tuples from an array of objects.

Each object in the first level array (being it a string, a number or an array) is interpreted as the contents of each returned Tuple.

Tuple Parse (string index)#

Parse a string and returns a Tuple.

The elements are comma separated.