Variant#
- class ampl.Variant : Comparer, IComparable, global.SystemIDisposable#
AMPL base type, can store a number or a string.
Public Functions
- int CompareTo (object obj)#
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
- Param obj:
An object to compare with this instance.
- Return:
A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes obj in the sort order. Zero This instance occurs in the same position in the sort order as obj . Greater than zero This instance follows obj in the sort order.
- void Dispose ()#
- override bool Equals (object other)#
Returns true if two Variants have the same type and value.
- override int GetHashCode ()#
Get a hash code for this variant.
- Variant (string s)#
- Variant (double d)
- Variant (ampl.VariantRef other)
VariantRef#
- class ampl.VariantRef : Comparer, IComparable, global.SystemIDisposable#
AMPL base type, can store a number or a string.
Public Functions
- int CompareTo (object obj)#
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
- Param obj:
An object to compare with this instance.
- Return:
A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes obj in the sort order. Zero This instance occurs in the same position in the sort order as obj . Greater than zero This instance follows obj in the sort order.
- override int Compare (VariantRef x, VariantRef y)#
- void Dispose ()#
- override bool Equals (object other)#
Returns true if two Variants have the same type and value.
- override int GetHashCode ()#
Get a hash code for this variant.
- VariantRef (string s)#
- VariantRef (double d)
- VariantRef (ampl.Variant other)