4 #define _USE_MATH_DEFINES // for MSVC 69 cfg.
value(i) = (rand()/(double)RAND_MAX) * 2 *
M_PI;
72 cfg.
value(i) = (rand()/(double)RAND_MAX) * delta + m_lbounds[
i];
unsigned int size()
get the number of degrees of freedom
Configuration random()
generate random position
std::vector< double > m_lbounds
std::vector< double > m_ubounds
static int min(int a, int b)
bool isValid(const Configuration &cfg) const
全ての要素が有効な範囲内にあるかどうか検査する
ConfigurationSpace(unsigned int i_size)
constructor
void unboundedRotation(unsigned int i_rank, bool i_flag)
specify i th degree of freedom is unbounded rotaion or not. default is false
std::vector< bool > m_isUnboundedRotation
std::vector< double > m_weights
double & weight(unsigned int i_rank)
get weight for i_rank th element
void bounds(unsigned int i_rank, double min, double max)
set bounds for i_rank th element
const double value(unsigned int i_rank) const
double & lbound(unsigned int i_rank)
get lower bound of i_rank th element
double & ubound(unsigned int i_rank)
get upper bound for i_rank th element
static int max(int a, int b)
unsigned int size() const
get the number of degrees of freedom