Public Member Functions | Public Attributes

SGParamInfo Class Reference


Detailed Description

Class that holds informations about a certain parameter of an CSGObject. Contains name, type, etc. This is used for mapping types that have changed in different versions of shogun. Instances of this class may be compared to each other. Ordering is based on name, equalness is based on all attributes.

Definition at line 28 of file ParameterMap.h.

List of all members.

Public Member Functions

 SGParamInfo ()
 SGParamInfo (const char *name, EContainerType ctype, EStructType stype, EPrimitiveType ptype, int32_t param_version)
 SGParamInfo (const TParameter *param, int32_t param_version)
 SGParamInfo (const SGParamInfo &orig)
virtual ~SGParamInfo ()
void print_param_info (const char *prefix="") const
char * to_string () const
SGParamInfoduplicate () const
bool operator== (const SGParamInfo &other) const
bool operator!= (const SGParamInfo &other) const
bool operator< (const SGParamInfo &other) const
bool operator> (const SGParamInfo &other) const
bool is_empty () const

Public Attributes

char * m_name
EContainerType m_ctype
EStructType m_stype
EPrimitiveType m_ptype
int32_t m_param_version

Constructor & Destructor Documentation

SGParamInfo (  ) 

constructor

Definition at line 17 of file ParameterMap.cpp.

SGParamInfo ( const char *  name,
EContainerType  ctype,
EStructType  stype,
EPrimitiveType  ptype,
int32_t  param_version 
)

constructor

Parameters:
name name of parameter, is copied
ctype container type of parameter
stype struct type of parameter
ptype primitive type of parameter
param_version version of parameter

Definition at line 37 of file ParameterMap.cpp.

SGParamInfo ( const TParameter param,
int32_t  param_version 
)

constructor to create from a TParameter instance

Parameters:
param TParameter instance to use
param_version version of parameter

Definition at line 49 of file ParameterMap.cpp.

SGParamInfo ( const SGParamInfo orig  ) 

copy constructor

Parameters:
orig element to copy from

Definition at line 26 of file ParameterMap.cpp.

~SGParamInfo (  )  [virtual]

destructor

Definition at line 61 of file ParameterMap.cpp.


Member Function Documentation

SGParamInfo * duplicate (  )  const
Returns:
an identical copy

Definition at line 104 of file ParameterMap.cpp.

bool is_empty (  )  const
Returns:
true iff this was constructed using the std constructor (empty parameter used to say that it appeared here first time

Definition at line 181 of file ParameterMap.cpp.

bool operator!= ( const SGParamInfo other  )  const

operator for comparison, false iff all attributes are equal

Definition at line 127 of file ParameterMap.cpp.

bool operator< ( const SGParamInfo other  )  const

operator for comparison (by string m_name, if equal by others)

Definition at line 132 of file ParameterMap.cpp.

bool operator== ( const SGParamInfo other  )  const

operator for comparison, true iff all attributes are equal

Definition at line 109 of file ParameterMap.cpp.

bool operator> ( const SGParamInfo other  )  const

operator for comparison (by string m_name, if equal by others)

Definition at line 176 of file ParameterMap.cpp.

void print_param_info ( const char *  prefix = ""  )  const

prints all parameter values

Definition at line 97 of file ParameterMap.cpp.

char * to_string (  )  const
Returns:
string representation, caller has to clean up

Definition at line 66 of file ParameterMap.cpp.


Member Data Documentation

EContainerType m_ctype

container type

Definition at line 90 of file ParameterMap.h.

char* m_name

name

Definition at line 87 of file ParameterMap.h.

int32_t m_param_version

version of the parameter

Definition at line 99 of file ParameterMap.h.

EPrimitiveType m_ptype

primitive type

Definition at line 96 of file ParameterMap.h.

EStructType m_stype

struct type

Definition at line 93 of file ParameterMap.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation