Feel++  0.92.0
Public Types | Public Member Functions | Friends
Feel::ParameterSpace< P >::Sampling Class Reference

Parameter space sampling class. More...

#include <parameterspace.hpp>

List of all members.

Public Types

typedef Sampling sampling_type
typedef boost::shared_ptr
< sampling_type
sampling_ptrtype
typedef ParameterSpace< Dimensionparameterspace_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

Detailed Description

template<int P>
class Feel::ParameterSpace< P >::Sampling

Parameter space sampling class.


Member Function Documentation

template<int P>
void Feel::ParameterSpace< P >::Sampling::equidistribute ( int  N) [inline]

create a sampling with equidistributed elements

Parameters:
Nthe number of samples

References Feel::ParameterSpace< P >::equidistributed().

template<int P>
size_type Feel::ParameterSpace< P >::Sampling::indexInSuperSampling ( size_type  index) const [inline]

given a local index, returns the index in the super sampling

Parameters:
indexindex in the local sampling
Returns:
the index in the super sampling
template<int P>
void Feel::ParameterSpace< P >::Sampling::logEquidistribute ( int  N) [inline]

create a sampling with equidistributed elements

Parameters:
Nthe number of samples

References Feel::ParameterSpace< P >::logEquidistributed().

template<int P>
void Feel::ParameterSpace< P >::Sampling::randomize ( int  N) [inline]

create a sampling with random elements

Parameters:
Nthe number of samples

References Feel::ParameterSpace< P >::logRandom().

template<int P>
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.

Parameters:
muthe point in parameter whom we want to find the neighbors
Mthe number of neighbors to find
Returns:
the vector
template<int P>
void Feel::ParameterSpace< P >::Sampling::setSuperSampling ( sampling_ptrtype const &  super) [inline]

set the super sampling

template<int P>
sampling_ptrtype const& Feel::ParameterSpace< P >::Sampling::superSampling ( ) const [inline]

Returns the supersampling (might be null)