Loading...
Searching...
No Matches

GAMS Transfer Records Formats. More...

GAMS Transfer Records Formats.

This class holds the possible GAMS Transfer formats of records similar to an enumeration class. Note that it is not an enumeration class due to compatibility (e.g. for Octave). See Records Format for more information.

Static Public Member Functions

static function int2str (in value_int)
 Converts an records format identifier to string.
 
static function str2int (in value_str)
 Converts an records format name to an identifier.
 
static function isValid (in value)
 Checks if a records format name or identifier is valid.
 

Public Attributes

Constant Property UNKNOWN = -1
 identifier for unknown records format
 
Constant Property EMPTY = 1
 identifier for empty records
 
Constant Property STRUCT = 2
 identifier for records format as struct
 
Constant Property DENSE_MATRIX = 3
 identifier for records format as dense matrix
 
Constant Property SPARSE_MATRIX = 4
 identifier for records format as sparse matrix
 
Constant Property TABLE = 5
 identifier for records format as table
 

Member Function Documentation

◆ int2str()

static function int2str ( in  value_int)
static

Converts an records format identifier to string.

  • s = RecordsFormat.int2str(i) returns a string with the records format name for the given records format identifier i. If i is an invalid identifier, this function returns "unknown".

Example:

GAMS Transfer Records Formats.
Definition: RecordsFormat.m:45
static function int2str(in value_int)
Converts an records format identifier to string.
Constant Property DENSE_MATRIX
identifier for records format as dense matrix
Definition: RecordsFormat.m:76

s equals "dense_matrix"

◆ isValid()

static function isValid ( in  value)
static

Checks if a records format name or identifier is valid.

  • b = RecordsFormat.isValid(s) returns true if s is a valid records format name or records format identifier and false otherwise.

Example:

RecordsFormat.isValid('dense_matrix') % is true
RecordsFormat.isValid('not_a_valid_name') % is false
static function isValid(in value)
Checks if a records format name or identifier is valid.

◆ str2int()

static function str2int ( in  value_str)
static

Converts an records format name to an identifier.

  • i = RecordsFormat.str2int(s) returns an integer identifier for the given records format name s. If s is an invalid format name, this function returns RecordsFormat.UNKNOWN.

Example:

i = RecordsFormat.str2int('dense_matrix')
static function str2int(in value_str)
Converts an records format name to an identifier.

i equals RecordsFormat.DENSE_MATRIX