Feel++
0.92.0
|
Parameter space sampling class. More...
#include <parameterspace.hpp>
Public Types | |
typedef Sampling | sampling_type |
typedef boost::shared_ptr < sampling_type > | sampling_ptrtype |
typedef ParameterSpace< Dimension > | parameterspace_type |
typedef boost::shared_ptr < parameterspace_type > | parameterspace_ptrtype |
typedef parameterspace_type::Element | element_type |
typedef boost::shared_ptr < element_type > | element_ptrtype |
typedef ANNkd_tree | kdtree_type |
typedef boost::shared_ptr < kdtree_type > | kdtree_ptrtype |
Public Member Functions | |
Sampling (parameterspace_ptrtype space, int N=1, sampling_ptrtype supersampling=sampling_ptrtype()) | |
void | randomize (int N) |
create a sampling with random elements | |
void | logEquidistribute (int N) |
create a sampling with equidistributed elements | |
void | equidistribute (int N) |
create a sampling with equidistributed elements | |
boost::tuple< element_type, size_type > | min () const |
Returns the minimum element in the sampling and its index. | |
boost::tuple< element_type, size_type > | max () const |
Returns the maximum element in the sampling and its index. | |
parameterspace_ptrtype | parameterSpace () const |
Retuns the parameter space. | |
sampling_ptrtype const & | superSampling () const |
void | setSuperSampling (sampling_ptrtype const &super) |
sampling_ptrtype | searchNearestNeighbors (element_type const &mu, size_type M=1) |
Returns the M closest points to mu in sampling. | |
sampling_ptrtype | complement () const |
if supersampling is != 0, Returns the complement | |
void | push_back (element_type const &mu, size_type index) |
add new parameter mu in sampling and store index in super sampling | |
size_type | indexInSuperSampling (size_type index) const |
given a local index, returns the index in the super sampling | |
Friends | |
class | boost::serialization::access |
Parameter space sampling class.
void Feel::ParameterSpace< P >::Sampling::equidistribute | ( | int | N | ) | [inline] |
create a sampling with equidistributed elements
N | the number of samples |
References Feel::ParameterSpace< P >::equidistributed().
size_type Feel::ParameterSpace< P >::Sampling::indexInSuperSampling | ( | size_type | index | ) | const [inline] |
given a local index, returns the index in the super sampling
index | index in the local sampling |
void Feel::ParameterSpace< P >::Sampling::logEquidistribute | ( | int | N | ) | [inline] |
create a sampling with equidistributed elements
N | the number of samples |
References Feel::ParameterSpace< P >::logEquidistributed().
void Feel::ParameterSpace< P >::Sampling::randomize | ( | int | N | ) | [inline] |
create a sampling with random elements
N | the number of samples |
References Feel::ParameterSpace< P >::logRandom().
boost::shared_ptr< typename ParameterSpace< P >::Sampling > Feel::ParameterSpace< P >::Sampling::searchNearestNeighbors | ( | element_type const & | mu, |
size_type | M = 1 |
||
) |
Returns the M
closest points to mu
in sampling.
mu | the point in parameter whom we want to find the neighbors |
M | the number of neighbors to find |
void Feel::ParameterSpace< P >::Sampling::setSuperSampling | ( | sampling_ptrtype const & | super | ) | [inline] |
set the super sampling
sampling_ptrtype const& Feel::ParameterSpace< P >::Sampling::superSampling | ( | ) | const [inline] |
Returns the supersampling (might be null)