1.1.0
CCC
 
Reading one or several Columns

Functions

VectorDouble Db::getColumn (const String &name, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnByUID (int iuid, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnByLocator (const ELoc &locatorType, int locatorIndex=0, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnByColIdx (int icol, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getAllColumns (bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumns (const VectorString &names=VectorString(), bool useSel=false, bool flagCompress=true) const
 
VectorVectorDouble Db::getColumnsAsVVD (const VectorString &names=VectorString(), bool useSel=false, bool flagCompress=true) const
 
MatrixRectangular Db::getColumnsAsMatrix (const VectorString &names, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnsByColIdx (const VectorInt &icols=VectorInt(), bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnsByColIdxInterval (int icol_beg, int icol_end, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnsByLocator (const ELoc &locatorType, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnsByUID (const VectorInt &iuids, bool useSel=false, bool flagCompress=true) const
 
VectorDouble Db::getColumnsByUIDRange (int iuid_beg, int iuid_end, bool useSel=false, bool flagCompress=true) const
 

Detailed Description

The column refers to one element of the Db (which can be viewed as an Excel spread sheet). Each variable stands as a column of this table: it is also attached a 'name' (which will serve as the name of the variable) and a possible 'locator' (which characterizes the role of the variable, e.g; coordinate, variable, code, ...). These functions can refer to a single column or to several of them. The columns can be referred to by the variable name, the column index, the internal Id (UID) or the locator.

Parameters
useSelOption when reading a masked sample:
  • TRUE: the contents of the masked samples is set to TEST
  • FALSE: the masked samples are returned with no impact of the selection
flagCompressOption when reading a masked sample:
  • TRUE: the returned array is compressed to the only non-masked samples
  • FALSE: the returned array is not compressed
nameName of the target column
namesVector of target variable names
locatorTypeType of target locator
iuidsVector of target user-identified ranks
icolsVector of Column ranks
icol_begLower bound of the rank interval (included)
icol_endUpper bound of the rank interval (excluded)
iuid_begLower bound of the user-identification interval (included)
iuid_endUpper bound of the user-identification interval (excluded)
locatorTypeType of the target locator
locatorIndexRank of the item (0-based) for the target locator
flagCompressWhen True, the masked values are skipped

Function Documentation

VectorDouble Db::getAllColumns ( bool  useSel = false,
bool  flagCompress = true 
) const

Returns all the Columns contained in a Db

VectorDouble Db::getColumn ( const String name,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of one Column identified by its name

VectorDouble Db::getColumnByColIdx ( int  icol,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the column referred by its rank (0-based)

VectorDouble Db::getColumnByLocator ( const ELoc &  locatorType,
int  locatorIndex = 0,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of one Column identified by its locator type and item rank

VectorDouble Db::getColumnByUID ( int  iuid,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns a Column referred by its user-identification rank

VectorDouble Db::getColumns ( const VectorString names = VectorString(),
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of the Colmuns specified by their names

MatrixRectangular Db::getColumnsAsMatrix ( const VectorString names,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of the columns specified by their names

VectorVectorDouble Db::getColumnsAsVVD ( const VectorString names = VectorString(),
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of the Columns specified by their names (one variable per column)

VectorDouble Db::getColumnsByColIdx ( const VectorInt icols = VectorInt(),
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of a set of Columns specified by their ranks (0 based)

VectorDouble Db::getColumnsByColIdxInterval ( int  icol_beg,
int  icol_end,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of a set of columns referred to by their rank interval (0 based)

VectorDouble Db::getColumnsByLocator ( const ELoc &  locatorType,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of a set of Columns identified by the locator type

VectorDouble Db::getColumnsByUID ( const VectorInt iuids,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of a set of Columns identified by their user-identified ranks

VectorDouble Db::getColumnsByUIDRange ( int  iuid_beg,
int  iuid_end,
bool  useSel = false,
bool  flagCompress = true 
) const

Returns the contents of a set of columns specified by the interval of their user-identification ranks