gams::GAMSSet Class Reference

#include <gamsset.h>

Inheritance diagram for gams::GAMSSet:
gams::GAMSSymbol

Public Member Functions

 GAMSSet ()
 Standard constructor. More...
 
 GAMSSet (const GAMSSymbol &other)
 
 ~GAMSSet ()
 Destructor. More...
 
GAMSSymbolIter< GAMSSetbegin ()
 
GAMSSymbolIter< GAMSSetend ()
 
GAMSSetoperator= (const GAMSSet &other)
 
GAMSSetRecord firstRecord (const std::vector< std::string > &slice)
 
GAMSSetRecord firstRecord ()
 
GAMSSetRecord firstRecord (const std::string &key1)
 
GAMSSetRecord firstRecord (const std::string &key1, const std::string &key2)
 
GAMSSetRecord firstRecord (const std::string &key1, const std::string &key2, const std::string &key3)
 
GAMSSetRecord lastRecord (const std::vector< std::string > &slice)
 
GAMSSetRecord lastRecord ()
 
GAMSSetRecord lastRecord (const std::string &key1)
 
GAMSSetRecord lastRecord (const std::string &key1, const std::string &key2)
 
GAMSSetRecord lastRecord (const std::string &key1, const std::string &key2, const std::string &key3)
 
GAMSSetRecord findRecord (const std::vector< std::string > &keys)
 
GAMSSetRecord findRecord ()
 
GAMSSetRecord findRecord (const std::string &key1)
 
GAMSSetRecord findRecord (const std::string &key1, const std::string &key2)
 
GAMSSetRecord findRecord (const std::string &key1, const std::string &key2, const std::string &key3)
 
GAMSSetRecord mergeRecord (const std::vector< std::string > &keys)
 
GAMSSetRecord mergeRecord ()
 
GAMSSetRecord mergeRecord (const std::string &key1)
 
GAMSSetRecord mergeRecord (const std::string &key1, const std::string &key2)
 
GAMSSetRecord mergeRecord (const std::string &key1, const std::string &key2, const std::string &key3)
 
GAMSSetRecord addRecord (const std::vector< std::string > &keys)
 
GAMSSetRecord addRecord ()
 
GAMSSetRecord addRecord (const std::string &key1)
 
GAMSSetRecord addRecord (const std::string &key1, const std::string &key2)
 
GAMSSetRecord addRecord (const std::string &key1, const std::string &key2, const std::string &key3)
 
- Public Member Functions inherited from gams::GAMSSymbol
 GAMSSymbol ()
 Standard constructor. More...
 
 GAMSSymbol (const GAMSSymbol &symbol)
 
virtual ~GAMSSymbol ()
 Destructor. More...
 
GAMSSymbol operator= (const GAMSSymbol &other)
 
bool operator!= (const GAMSSymbol &other) const
 
bool operator== (const GAMSSymbol &other) const
 
bool isValid () const
 
GAMSSymbolIter< GAMSSymbolbegin ()
 
GAMSSymbolIter< GAMSSymbolend ()
 
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< GAMSDomaindomains ()
 
bool checkDomains ()
 
std::vector< GAMSSymbolDomainViolationgetSymbolDVs (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::GAMSDatabasedatabase () const
 Get GAMSDatabase containing the GAMSSymbol. More...
 
std::string text () const
 Get explanatory text of GAMSSymbol. More...
 
std::string & name () const
 Get GAMSSymbol name. More...
 
int dim () const
 Get GAMSSymbol dimension. More...
 
int numberRecords () const
 Retrieve the number of records of the GAMSSymbol. More...
 
LogId logID ()
 
GAMSEnum::SymbolType type () const
 Get the symbol type. More...
 

Detailed Description

This is the representation of a set symbol in GAMS. It exists in a GAMSDatabase and contains GAMSSetRecords which one can iterate through.

Definition at line 36 of file gamsset.h.

Constructor & Destructor Documentation

◆ GAMSSet() [1/2]

gams::GAMSSet::GAMSSet ( )

Standard constructor.

◆ GAMSSet() [2/2]

gams::GAMSSet::GAMSSet ( const GAMSSymbol other)

Construtor for a GAMSSymbol.

Parameters
otherAnother GAMSSymbol used as data source.

◆ ~GAMSSet()

gams::GAMSSet::~GAMSSet ( )

Destructor.

Member Function Documentation

◆ addRecord() [1/5]

GAMSSetRecord gams::GAMSSet::addRecord ( const std::vector< std::string > &  keys)

Add record to GAMSSet.

Parameters
keysVector of keys.
Returns
Instance of GAMSSetRecord.

◆ addRecord() [2/5]

GAMSSetRecord gams::GAMSSet::addRecord ( )

Add record to GAMSSet.

Returns
Instance of GAMSSetRecord.

◆ addRecord() [3/5]

GAMSSetRecord gams::GAMSSet::addRecord ( const std::string &  key1)

Add record to GAMSSet.

Parameters
key1Key for first index position.
Returns
Instance of GAMSSetRecord.

◆ addRecord() [4/5]

GAMSSetRecord gams::GAMSSet::addRecord ( const std::string &  key1,
const std::string &  key2 
)

Add record to GAMSSet.

Parameters
key1Key for first index position.
key2Key for second index position.
Returns
Instance of GAMSSetRecord.

◆ addRecord() [5/5]

GAMSSetRecord gams::GAMSSet::addRecord ( const std::string &  key1,
const std::string &  key2,
const std::string &  key3 
)

Add record to GAMSSet.

Parameters
key1Key for first index position.
key2Key for second index position.
key3Key for third index position.
Returns
Instance of GAMSSetRecord.

◆ begin()

GAMSSymbolIter<GAMSSet> gams::GAMSSet::begin ( )

Interator to the begining.

Returns
Iterator to the first GAMSEquation.

◆ end()

GAMSSymbolIter<GAMSSet> gams::GAMSSet::end ( )

Iterator to end.

Returns
Iterator to the element following the last GAMSEquation.

◆ findRecord() [1/5]

GAMSSetRecord gams::GAMSSet::findRecord ( const std::vector< std::string > &  keys)

Find record in GAMSSet.

Parameters
keysVector of keys.
Returns
Instance of GAMSSetRecord.

◆ findRecord() [2/5]

GAMSSetRecord gams::GAMSSet::findRecord ( )

Find record in GAMSSet.

Returns
Instance of GAMSSetRecord.

◆ findRecord() [3/5]

GAMSSetRecord gams::GAMSSet::findRecord ( const std::string &  key1)

Find record in GAMSSet.

Parameters
key1Key for first index position.
Returns
Instance of GAMSSetRecord.

◆ findRecord() [4/5]

GAMSSetRecord gams::GAMSSet::findRecord ( const std::string &  key1,
const std::string &  key2 
)

Find record in GAMSSet.

Parameters
key1Key for first index position
key2Key for second index position
Returns
Instance of GAMSSetRecord

◆ findRecord() [5/5]

GAMSSetRecord gams::GAMSSet::findRecord ( const std::string &  key1,
const std::string &  key2,
const std::string &  key3 
)

Find record in GAMSSet.

Parameters
key1Key for first index position.
key2Key for second index position.
key3Key for third index position.
Returns
Instance of GAMSSetRecord.

◆ firstRecord() [1/5]

GAMSSetRecord gams::GAMSSet::firstRecord ( const std::vector< std::string > &  slice)

Retrieve the first record in GAMSSet that meets the slice criteria.

Parameters
sliceDefine filter for elements whose record should be retrieved.
Returns
Instance of GAMSSetRecord.

◆ firstRecord() [2/5]

GAMSSetRecord gams::GAMSSet::firstRecord ( )

Retrieve first record in GAMSSet.

Returns
Instance of GAMSSetRecord.

◆ firstRecord() [3/5]

GAMSSetRecord gams::GAMSSet::firstRecord ( const std::string &  key1)

Retrieve first record in GAMSSet that meets the slice criteria.

Parameters
key1Slicing criteria for first index position.
Returns
Instance of GAMSSetRecord.

◆ firstRecord() [4/5]

GAMSSetRecord gams::GAMSSet::firstRecord ( const std::string &  key1,
const std::string &  key2 
)

Retrieve first record in GAMSSet that meets the slice criteria.

Parameters
key1Slicing criteria for first index position.
key2Slicing criteria for second index position.
Returns
Instance of GAMSSetRecord.

◆ firstRecord() [5/5]

GAMSSetRecord gams::GAMSSet::firstRecord ( const std::string &  key1,
const std::string &  key2,
const std::string &  key3 
)

Retrieve first record in GAMSSet that meets the slice criteria.

Parameters
key1Slicing criteria for first index position.
key2Slicing criteria for second index position.
key3Slicing criteria for third index position.
Returns
Instance of GAMSSetRecord.

◆ lastRecord() [1/5]

GAMSSetRecord gams::GAMSSet::lastRecord ( const std::vector< std::string > &  slice)

Retrieve a slice of the last record in GAMSSet.

Parameters
sliceDefine filter for elements whose record should be retrieved.
Returns
Instance of GAMSSetRecord.

◆ lastRecord() [2/5]

GAMSSetRecord gams::GAMSSet::lastRecord ( )

Retrieve last record in GAMSSet.

Returns
Instance of GAMSSetRecord.

◆ lastRecord() [3/5]

GAMSSetRecord gams::GAMSSet::lastRecord ( const std::string &  key1)

Retrieve last record in GAMSSet.

Parameters
key1Slicing criteria for first index position.
Returns
Instance of GAMSSetRecord.

◆ lastRecord() [4/5]

GAMSSetRecord gams::GAMSSet::lastRecord ( const std::string &  key1,
const std::string &  key2 
)

Retrieve last record in GAMSSet.

Parameters
key1Slicing criteria for first index position.
key2Slicing criteria for second index position.
Returns
Instance of GAMSSetRecord.

◆ lastRecord() [5/5]

GAMSSetRecord gams::GAMSSet::lastRecord ( const std::string &  key1,
const std::string &  key2,
const std::string &  key3 
)

Retrieve last record in GAMSSet.

Parameters
key1Slicing criteria for first index position.
key2Slicing criteria for second index position.
key3Slicing criteria for third index position.
Returns
Instance of GAMSSetRecord.

◆ mergeRecord() [1/5]

GAMSSetRecord gams::GAMSSet::mergeRecord ( const std::vector< std::string > &  keys)

Finds record in GAMSSet if it exists; otherwise add it.

Parameters
keysList of keys.
Returns
Instance of found or added GAMSSetRecord.

◆ mergeRecord() [2/5]

GAMSSetRecord gams::GAMSSet::mergeRecord ( )

Finds record in GAMSSet if it exists; otherwise add it.

Returns
Instance of found or added GAMSSetRecord.

◆ mergeRecord() [3/5]

GAMSSetRecord gams::GAMSSet::mergeRecord ( const std::string &  key1)

Finds record in GAMSSet if it exists; otherwise add it.

Parameters
key1Key for first index position.
Returns
Instance of found or added GAMSSetRecord.

◆ mergeRecord() [4/5]

GAMSSetRecord gams::GAMSSet::mergeRecord ( const std::string &  key1,
const std::string &  key2 
)

Finds record in GAMSSet if it exists; otherwise add it.

Parameters
key1Key for first index position.
key2Key for second index position.
Returns
Instance of found or added GAMSSetRecord.

◆ mergeRecord() [5/5]

GAMSSetRecord gams::GAMSSet::mergeRecord ( const std::string &  key1,
const std::string &  key2,
const std::string &  key3 
)

Finds record in GAMSSet if it exists; otherwise add it.

Parameters
key1Key for first index position.
key2Key for second index position.
key3Key for third index position.
Returns
Instance of found or added GAMSSetRecord.

◆ operator=()

GAMSSet& gams::GAMSSet::operator= ( const GAMSSet other)

Assigns a GAMSSet.

Parameters
otherAnother GAMSSet used as data source.
Returns
Returns the assigned GAMSSet (*this).