OPTK  0.1.2
Toolkit for global optimisation algorithms
Public Member Functions | Private Attributes | List of all members
__gs::value< T > Class Template Reference
Inheritance diagram for __gs::value< T >:
__gs::param

Public Member Functions

 value (const std::string &k, pspace_t t)
 
 value (const std::string &k, std::vector< int > v)
 
 value (const std::string &k, std::vector< double > v)
 
 value (const std::string &k, std::vector< std::string > v)
 
std::vector< T > * get_vals ()
 
at (unsigned int i)
 
current ()
 
void set (std::vector< T > vs)
 
unsigned int get_count ()
 
bool next (T *val)
 
- Public Member Functions inherited from __gs::param
 param (const std::string &k, pspace_t t)
 
pspace_t get_type ()
 
std::string get_key ()
 

Private Attributes

std::vector< T > m_values
 
unsigned int m_i
 
unsigned int m_max
 

Detailed Description

template<class T>
class __gs::value< T >

Value contains lists of integers, doubles or strings.

Member Function Documentation

◆ get_count()

template<class T >
unsigned int __gs::value< T >::get_count ( )
inline

Returns the cardinality of the set of values for this parmeter.

◆ next()

template<class T >
bool __gs::value< T >::next ( T *  val)
inline

Next will iterate through the enumerated values for this parameter, and update the val parameter to be the next one along. If this is the first value in the set, then this function will return true, otherwise it will return false.

Parameters
valThe value to be updated with the next parameter.
Returns
A boolean indicating whether the returned value was the first in the set. This occurs upon first invokation, as well as when 'wrapping around'.

The documentation for this class was generated from the following file: