#include <gamsvariable.h>
Public Member Functions | |
| GAMSVariable () | |
| Default constructor. | |
| GAMSVariable (const GAMSSymbol &other) | |
| ~GAMSVariable () | |
| Destructor. | |
| GAMSSymbolIter< GAMSVariable > | begin () |
| GAMSSymbolIter< GAMSVariable > | end () |
| GAMSVariable & | operator= (const GAMSVariable &other) |
| GAMSVariableRecord | firstRecord (const std::vector< std::string > &slice) |
| GAMSVariableRecord | firstRecord () |
| GAMSVariableRecord | firstRecord (const std::string &key1) |
| GAMSVariableRecord | firstRecord (const std::string &key1, const std::string &key2) |
| GAMSVariableRecord | firstRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSVariableRecord | lastRecord (const std::vector< std::string > &slice) |
| GAMSVariableRecord | lastRecord () |
| GAMSVariableRecord | lastRecord (const std::string &key1) |
| GAMSVariableRecord | lastRecord (const std::string &key1, const std::string &key2) |
| GAMSVariableRecord | lastRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSVariableRecord | findRecord (const std::vector< std::string > &keys) |
| GAMSVariableRecord | findRecord () |
| GAMSVariableRecord | findRecord (const std::string &key1) |
| GAMSVariableRecord | findRecord (const std::string &key1, const std::string &key2) |
| GAMSVariableRecord | findRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSVariableRecord | mergeRecord (const std::vector< std::string > &keys) |
| GAMSVariableRecord | mergeRecord () |
| GAMSVariableRecord | mergeRecord (const std::string &key1) |
| GAMSVariableRecord | mergeRecord (const std::string &key1, const std::string &key2) |
| GAMSVariableRecord | mergeRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSVariableRecord | addRecord (const std::vector< std::string > &keys) |
| GAMSVariableRecord | addRecord () |
| GAMSVariableRecord | addRecord (const std::string &key1) |
| GAMSVariableRecord | addRecord (const std::string &key1, const std::string &key2) |
| GAMSVariableRecord | addRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSEnum::VarType | varType () |
| Retrieve subtype of variable (Binary, Integer, Positive, Negative, Free, SOS1, SOS2, SemiCont, SemiInt). | |
Public Member Functions inherited from gams::GAMSSymbol | |
| GAMSSymbol () | |
| Default constructor. | |
| GAMSSymbol (const GAMSSymbol &symbol) | |
| virtual | ~GAMSSymbol () |
| Destructor. | |
| GAMSSymbol | operator= (const GAMSSymbol &other) |
| bool | operator!= (const GAMSSymbol &other) const |
| bool | operator== (const GAMSSymbol &other) const |
| bool | isValid () const |
| GAMSSymbolIter< GAMSSymbol > | begin () |
| GAMSSymbolIter< GAMSSymbol > | end () |
| GAMSSymbolRecord | addRecord (const std::vector< std::string > &keys) |
| GAMSSymbolRecord | addRecord () |
| GAMSSymbolRecord | addRecord (const std::string &key1) |
| GAMSSymbolRecord | addRecord (const std::string &key1, const std::string &key2) |
| GAMSSymbolRecord | addRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| void | deleteRecord (const std::vector< std::string > &keys) |
| bool | clear () |
| std::vector< GAMSDomain > | domains () |
| bool | checkDomains () |
| std::vector< GAMSSymbolDomainViolation > | getSymbolDVs (int maxViol=0) |
| GAMSSymbolRecord | firstRecord (const std::vector< std::string > &slice) |
| GAMSSymbolRecord | firstRecord () |
| GAMSSymbolRecord | firstRecord (const std::string &key1) |
| GAMSSymbolRecord | firstRecord (const std::string &key1, const std::string &key2) |
| GAMSSymbolRecord | firstRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSSymbolRecord | lastRecord (const std::vector< std::string > &slice) |
| GAMSSymbolRecord | lastRecord () |
| GAMSSymbolRecord | lastRecord (const std::string &key1) |
| GAMSSymbolRecord | lastRecord (const std::string &key1, const std::string &key2) |
| GAMSSymbolRecord | lastRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSSymbolRecord | findRecord (const std::vector< std::string > &keys) |
| GAMSSymbolRecord | findRecord () |
| GAMSSymbolRecord | findRecord (const std::string &key1) |
| GAMSSymbolRecord | findRecord (const std::string &key1, const std::string &key2) |
| GAMSSymbolRecord | findRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| GAMSSymbolRecord | mergeRecord (const std::vector< std::string > &keys) |
| GAMSSymbolRecord | mergeRecord () |
| GAMSSymbolRecord | mergeRecord (const std::string &key1) |
| GAMSSymbolRecord | mergeRecord (const std::string &key1, const std::string &key2) |
| GAMSSymbolRecord | mergeRecord (const std::string &key1, const std::string &key2, const std::string &key3) |
| void | copySymbol (const GAMSSymbol &target) |
| gams::GAMSDatabase & | database () const |
| Get GAMSDatabase containing the GAMSSymbol. | |
| std::string | text () const |
| Get explanatory text of GAMSSymbol. | |
| std::string & | name () const |
| Get GAMSSymbol name. | |
| int | dim () const |
| Get GAMSSymbol dimension. | |
| int | numberRecords () const |
| Retrieve the number of records of the GAMSSymbol. | |
| LogId | logID () |
| GAMSEnum::SymbolType | type () const |
| Get the symbol type. | |
Detailed Description
This is the representation of a variable symbol in GAMS. It exists in a GAMSDatabase and contains GAMSVariableRecords which one can iterate through.
Definition at line 36 of file gamsvariable.h.
Constructor & Destructor Documentation
◆ GAMSVariable() [1/2]
| gams::GAMSVariable::GAMSVariable | ( | ) |
Default constructor.
◆ GAMSVariable() [2/2]
| gams::GAMSVariable::GAMSVariable | ( | const GAMSSymbol & | other | ) |
Constructor based on GAMSSymbol.
- Parameters
-
other Another GAMSSymbol used as data source.
◆ ~GAMSVariable()
| gams::GAMSVariable::~GAMSVariable | ( | ) |
Destructor.
Member Function Documentation
◆ addRecord() [1/5]
| GAMSVariableRecord gams::GAMSVariable::addRecord | ( | ) |
Add record to GAMSVariable.
- Returns
- Instance of GAMSVariableRecord.
◆ addRecord() [2/5]
| GAMSVariableRecord gams::GAMSVariable::addRecord | ( | const std::string & | key1 | ) |
Add record to GAMSVariable.
- Parameters
-
key1 Key for first index position.
- Returns
- Instance of GAMSVariableRecord.
◆ addRecord() [3/5]
| GAMSVariableRecord gams::GAMSVariable::addRecord | ( | const std::string & | key1, |
| const std::string & | key2 ) |
Add record to GAMSVariable.
- Parameters
-
key1 Key for first index position. key2 Key for second index position.
- Returns
- Instance of GAMSVariableRecord.
◆ addRecord() [4/5]
| GAMSVariableRecord gams::GAMSVariable::addRecord | ( | const std::string & | key1, |
| const std::string & | key2, | ||
| const std::string & | key3 ) |
Add record to GAMSVariable.
- Parameters
-
key1 Key for first index position. key2 Key for second index position. key3 Key for third index position.
- Returns
- Instance of GAMSVariableRecord.
◆ addRecord() [5/5]
| GAMSVariableRecord gams::GAMSVariable::addRecord | ( | const std::vector< std::string > & | keys | ) |
Add record to GAMSVariable.
- Parameters
-
keys Vector of keys.
- Returns
- Instance of GAMSVariableRecord.
◆ begin()
| GAMSSymbolIter< GAMSVariable > gams::GAMSVariable::begin | ( | ) |
Interator to the begining.
- Returns
- Iterator to the first GAMSVariable.
◆ end()
| GAMSSymbolIter< GAMSVariable > gams::GAMSVariable::end | ( | ) |
Iterator to end.
- Returns
- Iterator to the element following the last GAMSVariable.
◆ findRecord() [1/5]
| GAMSVariableRecord gams::GAMSVariable::findRecord | ( | ) |
Find record in GAMSVariable.
- Returns
- Instance of GAMSVariableRecord.
◆ findRecord() [2/5]
| GAMSVariableRecord gams::GAMSVariable::findRecord | ( | const std::string & | key1 | ) |
Find record in GAMSVariable.
- Parameters
-
key1 Key for first index position.
- Returns
- Instance of GAMSVariableRecord.
◆ findRecord() [3/5]
| GAMSVariableRecord gams::GAMSVariable::findRecord | ( | const std::string & | key1, |
| const std::string & | key2 ) |
Find record in GAMSVariable.
- Parameters
-
key1 Key for first index position. key2 Key for second index position.
- Returns
- Instance of GAMSVariableRecord.
◆ findRecord() [4/5]
| GAMSVariableRecord gams::GAMSVariable::findRecord | ( | const std::string & | key1, |
| const std::string & | key2, | ||
| const std::string & | key3 ) |
Find record in GAMSVariable.
- Parameters
-
key1 Key for first index position. key2 Key for second index position. key3 Key for third index position.
- Returns
- Instance of GAMSVariableRecord.
◆ findRecord() [5/5]
| GAMSVariableRecord gams::GAMSVariable::findRecord | ( | const std::vector< std::string > & | keys | ) |
Find record in GAMSVariable.
- Parameters
-
keys Vector of keys.
- Returns
- Instance of GAMSVariableRecord.
◆ firstRecord() [1/5]
| GAMSVariableRecord gams::GAMSVariable::firstRecord | ( | ) |
Retrieve first record in GAMSVariable.
- Returns
- Instance of GAMSVariableRecord.
◆ firstRecord() [2/5]
| GAMSVariableRecord gams::GAMSVariable::firstRecord | ( | const std::string & | key1 | ) |
Retrieve first record in GAMSVariable that meets the slice criteria.
- Parameters
-
key1 Slicing criteria for first index position.
- Returns
- Instance of GAMSVariableRecord.
◆ firstRecord() [3/5]
| GAMSVariableRecord gams::GAMSVariable::firstRecord | ( | const std::string & | key1, |
| const std::string & | key2 ) |
Retrieve first record in GAMSVariable that meets the slice criteria.
- Parameters
-
key1 Slicing criteria for first index position. key2 Slicing criteria for second index position.
- Returns
- Instance of GAMSVariableRecord.
◆ firstRecord() [4/5]
| GAMSVariableRecord gams::GAMSVariable::firstRecord | ( | const std::string & | key1, |
| const std::string & | key2, | ||
| const std::string & | key3 ) |
Retrieve first record in GAMSVariable that meets the slice criteria.
- Parameters
-
key1 Slicing criteria for first index position. key2 Slicing criteria for second index position. key3 Slicing criteria for third index position.
- Returns
- Instance of GAMSVariableRecord.
◆ firstRecord() [5/5]
| GAMSVariableRecord gams::GAMSVariable::firstRecord | ( | const std::vector< std::string > & | slice | ) |
Retrieve the first record in GAMSVariable that meets the slice criteria.
- Parameters
-
slice Define filter for elements whose record should be retrieved.
- Returns
- Instance of GAMSVariableRecord.
◆ lastRecord() [1/5]
| GAMSVariableRecord gams::GAMSVariable::lastRecord | ( | ) |
Retrieve last record in GAMSVariable.
- Returns
- Instance of GAMSVariableRecord.
◆ lastRecord() [2/5]
| GAMSVariableRecord gams::GAMSVariable::lastRecord | ( | const std::string & | key1 | ) |
Retrieve last record in GAMSVariable.
- Parameters
-
key1 Slicing criteria for first index position.
- Returns
- Instance of GAMSVariableRecord.
◆ lastRecord() [3/5]
| GAMSVariableRecord gams::GAMSVariable::lastRecord | ( | const std::string & | key1, |
| const std::string & | key2 ) |
Retrieve last record in GAMSVariable.
- Parameters
-
key1 Slicing criteria for first index position. key2 Slicing criteria for second index position.
- Returns
- Instance of GAMSVariableRecord.
◆ lastRecord() [4/5]
| GAMSVariableRecord gams::GAMSVariable::lastRecord | ( | const std::string & | key1, |
| const std::string & | key2, | ||
| const std::string & | key3 ) |
Retrieve last record in GAMSVariable.
- Parameters
-
key1 Slicing criteria for first index position. key2 Slicing criteria for second index position. key3 Slicing criteria for third index position.
- Returns
- Instance of GAMSVariableRecord.
◆ lastRecord() [5/5]
| GAMSVariableRecord gams::GAMSVariable::lastRecord | ( | const std::vector< std::string > & | slice | ) |
Retrieve a slice of the last record in GAMSVariable.
- Parameters
-
slice Define filter for elements whose record should be retrieved.
- Returns
- Instance of GAMSVariableRecord.
◆ mergeRecord() [1/5]
| GAMSVariableRecord gams::GAMSVariable::mergeRecord | ( | ) |
Finds record in GAMSVariable if it exists; otherwise add it.
- Returns
- Instance of found or added GAMSVariableRecord.
◆ mergeRecord() [2/5]
| GAMSVariableRecord gams::GAMSVariable::mergeRecord | ( | const std::string & | key1 | ) |
Finds record in GAMSVariable if it exists; otherwise add it.
- Parameters
-
key1 Key for first index position.
- Returns
- Instance of found or added GAMSVariableRecord.
◆ mergeRecord() [3/5]
| GAMSVariableRecord gams::GAMSVariable::mergeRecord | ( | const std::string & | key1, |
| const std::string & | key2 ) |
Finds record in GAMSVariable if it exists; otherwise add it.
- Parameters
-
key1 Key for first index position. key2 Key for second index position.
- Returns
- Instance of found or added GAMSVariableRecord.
◆ mergeRecord() [4/5]
| GAMSVariableRecord gams::GAMSVariable::mergeRecord | ( | const std::string & | key1, |
| const std::string & | key2, | ||
| const std::string & | key3 ) |
Finds record in GAMSVariable if it exists; otherwise add it.
- Parameters
-
key1 Key for first index position. key2 Key for second index position. key3 Key for third index position.
- Returns
- Instance of found or added GAMSVariableRecord.
◆ mergeRecord() [5/5]
| GAMSVariableRecord gams::GAMSVariable::mergeRecord | ( | const std::vector< std::string > & | keys | ) |
Finds record in GAMSVariable if it exists; otherwise add it.
- Parameters
-
keys List of keys.
- Returns
- Instance of found or added GAMSVariableRecord.
◆ operator=()
| GAMSVariable & gams::GAMSVariable::operator= | ( | const GAMSVariable & | other | ) |
Assigns a GAMSVariable.
- Parameters
-
other Another GAMSVariable used as data source.
- Returns
- Returns the assigned GAMSVariable (*this).
◆ varType()
| GAMSEnum::VarType gams::GAMSVariable::varType | ( | ) |
Retrieve subtype of variable (Binary, Integer, Positive, Negative, Free, SOS1, SOS2, SemiCont, SemiInt).
Public Member Functions inherited from