#include <parameterspace.hpp>
Parameter space sampling class.
Inherits vector< Element >.
Public Types | |
typedef boost::shared_ptr < element_type > | element_ptrtype |
typedef parameterspace_type::Element | element_type |
typedef boost::shared_ptr < parameterspace_type > | parameterspace_ptrtype |
typedef ParameterSpace< Dimension > | parameterspace_type |
typedef boost::shared_ptr < sampling_type > | sampling_ptrtype |
typedef Sampling | sampling_type |
Public Member Functions | |
std::vector< int > | closestSamplingFromFile (std::string file_name="list_of_parameters_taken") |
sampling_ptrtype | complement () const |
if supersampling is != 0, Returns the complement | |
void | equidistribute (int N) |
create a sampling with equidistributed elements More... | |
void | equidistributeProduct (std::vector< int > N) |
create a sampling with equidistributed elements More... | |
void | generateElementsProduct (std::vector< std::vector< double > > components) |
void | generateElementsProduct (std::vector< std::vector< std::vector< double > > > vector_components) |
size_type | indexInSuperSampling (size_type index) const |
given a local index, returns the index in the super sampling More... | |
void | logEquidistribute (int N) |
create a sampling with log-equidistributed elements More... | |
void | logEquidistributeProduct (std::vector< int > N) |
create a sampling with log-equidistributed elements More... | |
boost::tuple< element_type, size_type > | max () const |
Returns the maximum element in the sampling and its index. | |
boost::tuple< element_type, size_type > | min () const |
Returns the minimum element in the sampling and its index. | |
void | mixEquiLogEquidistributeProduct (std::vector< int > Nlogequi, std::vector< int > Nequi) |
create a sampling with log-equidistributed and equidistributed elements More... | |
parameterspace_ptrtype | parameterSpace () const |
Retuns the parameter space. | |
void | push_back (element_type const &mu, size_type index) |
add new parameter mu in sampling and store index in super sampling | |
void | randomize (int N) |
create a sampling with random elements More... | |
double | readFromFile (std::string file_name="list_of_parameters_taken") |
read the sampling from a file More... | |
Sampling (parameterspace_ptrtype space, int N=1, sampling_ptrtype supersampling=sampling_ptrtype()) | |
sampling_ptrtype | searchNearestNeighbors (element_type const &mu, size_type M, std::vector< int > &index_vector) |
Returns the M closest points to mu in sampling. More... | |
void | setElements (std::vector< element_type > V) |
create a sampling with elements given by the user More... | |
void | setSuperSampling (sampling_ptrtype const &super) |
sampling_ptrtype const & | superSampling () const |
void | writeOnFile (std::string file_name="list_of_parameters_taken") |
write the sampling in a file More... | |
Friends | |
class | boost::serialization::access |
|
inline |
build the closest sampling with parameters given from the file look in the supersampling closest parameters
file_name | : give the real parameters we want return the index vector of parameters in the supersampling |
|
inline |
create a sampling with equidistributed elements
N | the number of samples |
References Feel::ParameterSpace< P >::equidistributed().
|
inline |
create a sampling with equidistributed elements
N | : vector containing the number of samples on each direction |
References Feel::ParameterSpace< P >::equidistributeInDirection().
|
inline |
given a local index, returns the index in the super sampling
index | index in the local sampling |
|
inline |
create a sampling with log-equidistributed elements
N | the number of samples |
References Feel::ParameterSpace< P >::logEquidistributed().
|
inline |
create a sampling with log-equidistributed elements
N | : vector containing the number of samples on each direction |
References Feel::ParameterSpace< P >::logEquidistributeInDirection().
|
inline |
create a sampling with log-equidistributed and equidistributed elements
Nlogequi | : vector containing the number of log-equidistributed samples on each direction |
Nequi | : vector containing the number of equidistributed samples on each direction |
References Feel::ParameterSpace< P >::equidistributeInDirection(), and Feel::ParameterSpace< P >::logEquidistributeInDirection().
|
inline |
create a sampling with random elements
N | the number of samples |
References Feel::ParameterSpace< P >::logRandom().
|
inline |
read the sampling from a file
file_name | : name of the file to read in the file we expect : mu_0= [ value0 , value1 , ... ] mu_1= [ value0 , value1 , ... ] return the size of the sampling |
boost::shared_ptr< typename ParameterSpace< P >::Sampling > Feel::ParameterSpace< P >::Sampling::searchNearestNeighbors | ( | element_type const & | mu, |
size_type | M, | ||
std::vector< int > & | index_vector | ||
) |
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 |
|
inline |
create a sampling with elements given by the user
V | : vector of element_type |
|
inline |
set the super sampling
|
inline |
Returns the supersampling (might be null)
|
inline |
write the sampling in a file
file_name | : name of the file to read in the file we write : mu_0= [ value0 , value1 , ... ] mu_1= [ value0 , value1 , ... ] |