1.3.2
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

◆ getAllColumns()

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

Returns all the Columns contained in a Db

◆ getColumn()

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

Returns the contents of one Column identified by its name

◆ getColumnByColIdx()

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

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

◆ getColumnByLocator()

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

◆ getColumnByUID()

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

Returns a Column referred by its user-identification rank

◆ getColumns()

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

Returns the contents of the Colmuns specified by their names

◆ getColumnsAsMatrix()

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

Returns the contents of the columns specified by their names

◆ getColumnsAsVVD()

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)

◆ getColumnsByColIdx()

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)

◆ getColumnsByColIdxInterval()

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)

◆ getColumnsByLocator()

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

◆ getColumnsByUID()

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

◆ getColumnsByUIDRange()

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