golib  0.5
Types

Classes

class  goType
 Provides type information. More...
 

Typedefs

typedef unsigned char goUInt8
 
typedef char goSint8
 
typedef char goInt8
 
typedef goInt8 goByte
 
typedef goUInt8 goUByte
 
typedef unsigned short goUInt16
 
typedef short goInt16
 
typedef unsigned int goUInt32
 
typedef int goInt32
 
typedef unsigned long goUInt64
 
typedef long goInt64
 
typedef goInt32 goIndex_t
 
typedef double goDouble
 
typedef float goFloat
 
typedef size_t goSize_t
 
typedef go3Vector< goSize_tgoSize3D
 
typedef int goPtrOffset_t
 
typedef goPtrOffset_t goPtrdiff_t
 
typedef double goTime_t
 
typedef clock_t goClock_t
 
typedef int goTypeEnum
 

Enumerations

enum  {
  GO_INT8, GO_INT16, GO_INT32, GO_INT64,
  GO_UINT8, GO_UINT16, GO_UINT32, GO_UINT64,
  GO_FLOAT, GO_DOUBLE, GO_VOID_POINTER, GO_COMPLEX_SINGLE,
  GO_COMPLEX_DOUBLE
}
 Type enumerators.
 

Functions

template<class T >
goTypeEnum goTypeID ()
 
template<class targetT >
targetT * goCreateQuantizationTable (const goType &sourceType, targetT minTargetValue, targetT maxTargetValue, goIndex_t minIndex, goIndex_t maxIndex, goArray< targetT > &tableRet, goDouble sourceMin=0.0, goDouble sourceMax=-1.0)
 Create a quantization table (lookup table) for a given source type. More...
 

Detailed Description

Typedef Documentation

◆ goClock_t

typedef clock_t goClock_t

Clock tick type

◆ goPtrOffset_t

typedef int goPtrOffset_t

Pointer types:

◆ goSize_t

typedef size_t goSize_t

Misc types:

◆ goTime_t

typedef double goTime_t

Types mainly for signal handling:

Function Documentation

◆ goCreateQuantizationTable()

template<class targetT >
targetT* goCreateQuantizationTable ( const goType sourceType,
targetT  minTargetValue,
targetT  maxTargetValue,
goIndex_t  minIndex,
goIndex_t  maxIndex,
goArray< targetT > &  tableRet,
goDouble  sourceMinimum,
goDouble  sourceMaximum 
)

Create a quantization table (lookup table) for a given source type.

Parameters
sourceTypegoType of the source data type.
minTargetValueMinimum target value, associated with minIndex.
maxTargetValueMaximum target value, associated with maxIndex.
minIndexMinimum index into the table.
maxIndexMaximum index into the table. @oaran tableRet Reference to a goArray of type targetT which contains the quantization table after the function returns.
sourceMinimumSee note! If sourceMinimum > sourceMaximum, the default values for the source data type are used. If not, these values are used as min and max data values for the input data type of the quantization table. Default is sourceMinimum = 0.0 and sourceMaximum = -1.0.
sourceMaximumSee note! See above.
Note
WARNING: Do not hand over sourceMinimum and sourceMaximum. This does not work.
Todo:
sourceMinimum and sourceMaximum does not work because index functions assume certain value ranges (esp. float/double!!)
Returns
A pointer to the quantization table entry associated with index 0 which is simply &tableRet[-minIndex].
Note
This works currently only for scalar types.