Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

plKernel Class Reference

The {plKernel} class is the base class of all probability (and density) distributions. More...

#include <plKernel.h>

Inheritance diagram for plKernel:

Inheritance graph
[legend]
Collaboration diagram for plKernel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

plKerneloperator= (const plKernel &assigned_kernel)
 Assignation operator.
 plKernel (const plKernel &)
 Constructs a Kernel from another Kernel.
 plKernel (const class plProduct &)
 Constructs a Kernel from a plProduct.
 plKernel (const class plComputableObjectList &)
 Constructs a Kernel from a plComputableObjetList.
virtual ~plKernel ()
 Destroys the Kernel.
void draw (plValues &res) const
 Draw a set of function variables values, according to the function distribution and depose them in a plValues.
plValues draw () const
 Draw a set of function variables values, according to the function distribution and depose them in a plValues.
void draw (int *parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an integer array.
void draw (unsigned int *parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an unsigned integer array.
void draw (long int *parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a long integer array.
void draw (float *parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a float array.
void draw (double *parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a double array.
void draw (long double *parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a long double array.
void draw (int &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a integer.
void draw (unsigned int &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an unsigned integer.
void draw (long int &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a long integer.
void draw (float &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a float.
void draw (double &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a double.
void draw (long double &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in a long double.
void draw (vector< int > &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL integer vector.
void draw (vector< unsigned int > &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL unsigned integer vector.
void draw (vector< long int > &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL long integer vector.
void draw (vector< float > &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL float vector.
void draw (vector< double > &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL double vector.
void draw (vector< long double > &parameter) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL long double vector.
void best (plValues &res) const
 Optimize the function and returns the function variables values that executes that optimization in a plValues.
plValues best () const
 Optimize the function and returns the function variables values that executes that optimization in a plValues.
void best (int *parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a integer array.
void best (unsigned int *parameter) const
 Optimize the function and returns the function variables values that executes that optimization in an unsigned integer array.
void best (long int *parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a long integer array.
void best (float *parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a float array.
void best (double *parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a double array.The size of { parameter} must be at least the number of parameters.
void best (long double *parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a long double array.
void best (int &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a variable of type integer.Attention mainly used with one variable kernels.
void best (unsigned int &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a variable of type unsigned integer.Attention mainly used with one variable kernels.
void best (long int &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a variable of type long integer.Attention mainly used with one variable kernels.
void best (float &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a variable of type float.
void best (double &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a variable of type double.Attention mainly used with one variable kernels.
void best (long double &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in a variable of type long double.Attention mainly used with one variable kernels.
void best (vector< int > &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in an STL integer vector.
void best (vector< unsigned int > &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in an STL unsigned integer vector.
void best (vector< long int > &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in an STL long integer vector.The size of { parameter} must be at least the number of parameters.
void best (vector< float > &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in an STL float vector.
void best (vector< double > &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in an STL double vector.
void best (vector< long double > &parameter) const
 Optimize the function and returns the function variables values that executes that optimization in an STL long double vector.
void test_draw (const unsigned int number_of_tests, const string &file_name)
 Generates a test for the kernel consisting in {number } random trays (this trays are generated by using the draw() method).
void test_draw (const unsigned int number_of_tests, const string &file_name, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n)
 Generates a test for the kernel consisting in {number } random trays (this trays are generated by using the draw() method).
void n_compile (plKernel &result, unsigned long n_iterations, plGeneratorType generator_type=PL_MC_GENERATOR, plCompiledDistributionType compiled_distrib_type=PL_MAP) const
 Compiles the kernel by sampling it using a set of points in the variables space.
void time_compile (plKernel &result, double time_in_seconds, plGeneratorType generator_type=PL_MC_GENERATOR, plCompiledDistributionType compiled_distrib_type=PL_MAP) const
 Compiles the kernel by sampling it using a set of points in the variables space.
plKernel time_compile (double time_in_seconds, plGeneratorType generator_type=PL_MC_GENERATOR, plCompiledDistributionType compliled_distrib_type=PL_MAP) const
 Does a time_compile(), and returns the compiled kernel.
void compile (plKernel &result) const
 Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.
plKernel compile () const
 Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.
void lowMemoryUse_compile (plKernel &result) const
 Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.
void compile (plKernel &result, plCompiledDistributionType compiled_distrib_type) const
 Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.
void compile (plKernel &result, const vector< plDataValues > &values, const plCompiledDistributionType &compilType) const
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) by evaluating a sample of points given by the user as plDataValues vector.
void compile (plKernel &result, const vector< plValues > &values, const plCompiledDistributionType &compilType) const
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) by evaluating a sample of points given by the user as plValues vector.
void compile (plKernel &result, const list< plValues > &values, const plCompiledDistributionType &compilType) const
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) by evaluating a sample of points given by the user as plValues list.
void build_using_samples (const vector< plDataValues > &values, const plCompiledDistributionType &compilType)
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) by evaluating a sample of points given by the user as plDataValues vector.
void build_using_samples (const vector< plValues > &values, const plCompiledDistributionType &compilType)
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) according to a sample of points given by the user as plValues vector.
void build_using_samples (const list< plValues > &values, const plCompiledDistributionType &compilType)
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) according to a sample of points given by the user as plValues list.
void compile (plKernel &result, const vector< pair< plDataValues, plProbValue > > &values, const plCompiledDistributionType &compilType) const
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) according to a sample of points given by the user as plDataValues vector.
void compile (plKernel &result, const vector< pair< plValues, plProbValue > > &values, const plCompiledDistributionType &compilType) const
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) according to a sample of points given by the user as plValues vector.
void compile (plKernel &result, const list< pair< plValues, plProbValue > > &values, const plCompiledDistributionType &compilType) const
 Constructs an distribution of type "compilType" (i.e PL_MRBT, PL_TABLE, or PL_MAP) according to a sample of points given by the user as plValues list.
void incremental_n_compile (plKernel &result, unsigned long n_iterations, plGeneratorType generatorType=PL_MC_GENERATOR, plCompiledDistributionType distrib_type=PL_MAP) const
 Like "n_compile" with the possibility to incrementally compile the kernel.
void incremental_time_compile (plKernel &result, double time_in_seconds, plGeneratorType generatorType=PL_MC_GENERATOR, plCompiledDistributionType distrib_type=PL_MAP) const
 Like "time_compile" with the possibility to incrementally compile the kernel.
void tabulate (ostream &out=cout, bool print_on_zero=true) const
 Tabulates the kernel in "out" stream.
void tabulate (vector< plProbValue > &output) const
 Tabulates the kernel in "output" plProbValue vector.
void tabulate (list< plProbValue > &output) const
 Tabulates the kernel in "output" plProbValue list.
void sorted_tabulate (vector< pair< plValues, plProbValue > > &output) const
 Tabulates the kernel in "output" vector <pair <plDataValues, plProbValue> >.
void plot (char *file_name, const int n_samples=100) const
 Creates a gnuplot file named { file} that plots the kernel {compute} function.The number of samples on each dimension is given by {n_samples}.
kplComputableObject * get_root_kernel () const
 Returns the pointer to itself if the kernel is not a {built in kernel (function)} otherwise it returns a pointer to the kernel level kernel (function).
ostream & write_head (ostream &out) const
 Writes the the kernel head at the output stream {out}.
ostream & write_body (ostream &out) const
 Writes the kernel body at the output stream {out}.
void time_best (plValues &res, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a plValues.
void time_best (int *parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a integer array.
void time_best (unsigned int *parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an unsigned integer array.
void time_best (long int *parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a long integer array.
void time_best (float *parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a float array.
void time_best (double *parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a double array.The size of { parameter} must be at least the number of parameters.
void time_best (long double *parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a long double array.
void time_best (int &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type integer.Attention mainly used with one variable kernels.
void time_best (unsigned int &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type unsigned integer.Attention mainly used with one variable kernels.
void time_best (long int &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type long integer.Attention mainly used with one variable kernels.
void time_best (float &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type float.
void time_best (double &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type double.Attention mainly used with one variable kernels.
void time_best (long double &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type long double.Attention mainly used with one variable kernels.
void time_best (vector< int > &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL integer vector.
void time_best (vector< unsigned int > &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL unsigned integer vector.
void time_best (vector< long int > &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL long integer vector.The size of { parameter} must be at least the number of parameters.
void time_best (vector< float > &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL float vector.
void time_best (vector< double > &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL double vector.
void time_best (vector< long double > &parameter, double time_in_seconds) const
 Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL long double vector.
void draw (plValues &res, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a plValues.
void draw (int *parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an integer array.
void draw (unsigned int *parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an unsigned integer array.
void draw (long int *parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a long integer array.
void draw (float *parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a float array.
void draw (double *parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a double array.
void draw (long double *parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a long double array.
void draw (int &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a integer.
void draw (unsigned int &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an unsigned integer.
void draw (long int &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a long integer.
void draw (float &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a float.
void draw (double &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a double.
void draw (long double &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in a long double.
void draw (vector< int > &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL integer vector.
void draw (vector< unsigned int > &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL unsigned integer vector.
void draw (vector< long int > &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL long integer vector.
void draw (vector< float > &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL float vector.
void draw (vector< double > &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL double vector.
void draw (vector< long double > &parameter, const plValues &initial_state, const vector< plFloat > &proposal_standard_deviation, unsigned int n, plProbValue &probability) const
 Draw a set of function variables values, according to the function distribution and depose them in an STL long double vector.
void replace (const plVariablesConjunction &left_vars, const plVariablesConjunction &right_vars, plCndKernel &new_cnd_kernel)
 Replace the conditional distribution P(left_vars | right_vars) by an other conditional ditribution "new_cnd_kernel".
void replace (const plVariablesConjunction &left_vars, plKernel &new_kernel)
 Replace the distribution P(left_vars ) by an other ditribution "new_kernel".
double get_exhaustive_compilation_complexity () const
 Get the sum of the number of sums and the number of products required to compile the corresponding expression.
double get_exhaustive_update_complexity () const
 Get the sum of the number of sums and the number of products required to update the corresponding expression for a new given evidence value.
plFloat computeShannonEntropy () const
 Compute Shannon's entropy of the kernel.
void computeExpectation (plValues &res) const
 Compute the expectation of the kernel.
void computeExpectation (vector< float > &res) const
 Compute the expectation of the kernel.
void computeExpectation (vector< double > &res) const
 Compute the expectation of the kernel.
void computeExpectation (vector< long double > &res) const
 Compute the expectation of the kernel.
ostream & outputTree (ostream &out) const
 Displays the evaluation tree corresponding to the kernel.
bool isNull () const
 Return 'true' if the kernel is NULL.

Protected Member Functions

plProbValue kernel_compute (const plDataValues &params) const
 Computes the value of the function, according to a list of parameters at kernel level.
void kernel_rename (const map< kplVariable *, kplVariable * > &rename_map)
 Renames the variables of a function at kernel level.
void write_var_test_result (const kplVariable *var_ptr, const vector< unsigned int > &vars_histogram, const string &test_name)
 Writes the variable histogram generated by test named {test }.

Protected Attributes

kplKernel * root_kernel
 Pointer to the kernel at kernel level (function).

Friends

class plCndKernel
 Friend classes and functions.

Detailed Description

The {plKernel} class is the base class of all probability (and density) distributions.

Definition at line 45 of file plKernel.h.


Member Function Documentation

void plKernel::best vector< long double > &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in an STL long double vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::best vector< double > &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in an STL double vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::best vector< float > &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in an STL float vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::best vector< unsigned int > &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in an STL unsigned integer vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::best vector< int > &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in an STL integer vector.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::best long double &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a variable of type long double.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::best double &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a variable of type double.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::best float &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a variable of type float.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::best long int &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a variable of type long integer.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::best unsigned int &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a variable of type unsigned integer.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::best int &  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a variable of type integer.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::best long double *  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a long double array.

The size of { parameter} must be at least the number of parameters.

void plKernel::best float *  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a float array.

The size of { parameter} must be at least the number of parameters.

void plKernel::best long int *  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a long integer array.

The size of { parameter} must be at least the number of parameters.

void plKernel::best unsigned int *  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in an unsigned integer array.

The size of { parameter} must be at least the number of parameters.

void plKernel::best int *  parameter  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a integer array.

The size of { parameter} must be at least the number of parameters.

plValues plKernel::best  )  const
 

Optimize the function and returns the function variables values that executes that optimization in a plValues.

Note that this method returns a freshly created object. If you are calling it in a loop, consider using the version that modifies an existing object instead.

void plKernel::compile plKernel result,
plCompiledDistributionType  compiled_distrib_type
const
 

Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.

by generating all points of the discrete or discretized variables space) and stores the result as a {compiled_distrib_type}

plKernel plKernel::compile  )  const
 

Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.

by generating all points of the discrete or discretized variables space) and stores the result as a table (PL_TABLE). Note that this method returns a freshly created object. If you are calling it in a loop, consider using the version that modifies an existing object instead.

void plKernel::compile plKernel result  )  const
 

Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.

by generating all points of the discrete or discretized variables space) and stores the result as a table (PL_TABLE)

void plKernel::draw vector< long double > &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an STL long double vector.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw vector< double > &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an STL double vector.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw vector< float > &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an STL float vector.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw vector< long int > &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an STL long integer vector.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw vector< unsigned int > &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an STL unsigned integer vector.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw vector< int > &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an STL integer vector.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw long double &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a long double.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored. Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw double &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a double.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored. Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw float &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a float.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored. Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw long int &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a long integer.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored. Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw unsigned int &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an unsigned integer.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::draw int &  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a integer.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored. Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw long double *  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a long double array.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw double *  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a double array.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw float *  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a float array.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw long int *  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a long integer array.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw unsigned int *  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an unsigned integer array.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw int *  parameter,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in an integer array.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw plValues res,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n,
plProbValue &  probability
const
 

Draw a set of function variables values, according to the function distribution and depose them in a plValues.

Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.
  • probability: the probability (or density value) of the returned point.

void plKernel::draw long double &  parameter  )  const
 

Draw a set of function variables values, according to the function distribution and depose them in a long double.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::draw double &  parameter  )  const
 

Draw a set of function variables values, according to the function distribution and depose them in a double.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::draw float &  parameter  )  const
 

Draw a set of function variables values, according to the function distribution and depose them in a float.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::draw long int &  parameter  )  const
 

Draw a set of function variables values, according to the function distribution and depose them in a long integer.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::draw unsigned int &  parameter  )  const
 

Draw a set of function variables values, according to the function distribution and depose them in an unsigned integer.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::draw int &  parameter  )  const
 

Draw a set of function variables values, according to the function distribution and depose them in a integer.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

plValues plKernel::draw  )  const
 

Draw a set of function variables values, according to the function distribution and depose them in a plValues.

Note that this method returns a freshly created object. If you are calling it in a loop, consider using the version that modifies an existing object instead.

void plKernel::incremental_n_compile plKernel result,
unsigned long  n_iterations,
plGeneratorType  generatorType = PL_MC_GENERATOR,
plCompiledDistributionType  distrib_type = PL_MAP
const
 

Like "n_compile" with the possibility to incrementally compile the kernel.

It assumes to be called on the same result kernel "result" to update it. It also assumed that that this result kernel is empty for the fist call. The first call is equivalent to a call to "n_compile". The parameters "generatorType" and "distrib_type" are taken into account only in the first call.

void plKernel::incremental_time_compile plKernel result,
double  time_in_seconds,
plGeneratorType  generatorType = PL_MC_GENERATOR,
plCompiledDistributionType  distrib_type = PL_MAP
const
 

Like "time_compile" with the possibility to incrementally compile the kernel.

It assumes to be called on the same result kernel "result" to update it. It also assumed that that this result kernel is empty for the fist call. The first call is equivalent to a call to "time_compile". The parameters "generatorType" and "distrib_type" are taken into account only in the first call.

void plKernel::lowMemoryUse_compile plKernel result  )  const
 

Compiles the kernel using an exhaustive generator (PL_EXHAUSTIVE_GENERATOR) (i.e.

by generating all points of the discrete or discretized variables space) and stores the result as a table (PL_TABLE)

void plKernel::n_compile plKernel result,
unsigned long  n_iterations,
plGeneratorType  generator_type = PL_MC_GENERATOR,
plCompiledDistributionType  compiled_distrib_type = PL_MAP
const
 

Compiles the kernel by sampling it using a set of points in the variables space.

The used points may be generated using 4 possible methods (according to the value of generator_type):
1) Using all points of the discrete or discretized variables space (PL_EXHAUSTIVE_GENERATOR)
2) Using {n_iterations} as a number of points generated at random from the variables space (PL_RANDOM_GENERATOR)
3) Using {n_iterations} as a number of points generated using a Monte Carlo generator from the variables space (PL_MC_GENERATOR). It's the default value.
4) Using {n_iterations} as a number of points generated using a Genetic Algorithm generator from the variables space (PL_GA_GENERATOR)

The result of the compilation is stored as (according to the value of compiled_distrib_type):
1) a table (PL_TABLE).
2) an MRBT (PL_MRBT).
3) a map (PL_MAP) for non-null values. It's the default value

void plKernel::plot char *  file_name,
const int  n_samples = 100
const
 

Creates a gnuplot file named { file} that plots the kernel {compute} function.The number of samples on each dimension is given by {n_samples}.

This method doesn't work for kernels

on a variable set with more than two variables *

void plKernel::replace const plVariablesConjunction left_vars,
plKernel new_kernel
[virtual]
 

Replace the distribution P(left_vars ) by an other ditribution "new_kernel".

new_kernel must have the same left variables.

Implements plComputableObject.

void plKernel::replace const plVariablesConjunction left_vars,
const plVariablesConjunction right_vars,
plCndKernel new_cnd_kernel
[virtual]
 

Replace the conditional distribution P(left_vars | right_vars) by an other conditional ditribution "new_cnd_kernel".

new_cnd_kernel must have the same left and right variables.

Implements plComputableObject.

void plKernel::sorted_tabulate vector< pair< plValues, plProbValue > > &  output  )  const
 

Tabulates the kernel in "output" vector <pair <plDataValues, plProbValue> >.

The The value P(X) is computed for each possible value of the kernel variables and put, sorted by probability in the output map "output". Function not allowed for Kernels with non-discretized continuous variables.

void plKernel::tabulate list< plProbValue > &  output  )  const
 

Tabulates the kernel in "output" plProbValue list.

The value P(X) is computed for each possible value of the kernel variables and put in the output list "output". Function not allowed for kernels with non-discretized continuous variables.
Same as the method above for multi-dimensional cases

void plKernel::tabulate vector< plProbValue > &  output  )  const
 

Tabulates the kernel in "output" plProbValue vector.

The value P(X) is computed for each possible value of the kernel variables and put is the output vector "output". Function not allowed for kernels with non-discretized continuous variables.

In multi-dimensional cases ( P(H1^H2) ), where {H1} and {H2} can take n1 and n2 values respectively, it constructs the probability table on P(H) using the values {values} as follows:

  • output[0] = P([H1=1, H2=1])
  • output[1] = P([H1=1, H2=2])
    .
    .
    .
  • output[n2-1] = P([H1=1, H2=n2])

  • output[n2] = P([H1=2, H2=1])
  • output[n2+1] = P([H1=2, H2=2])
    .
    .
    .
  • output[2*(n2-1)] = P([H1=2, H2=n2])
    .
    .
    .
  • output[(n1-1)*(n2-1)] = P([H1=n, H2=m])

void plKernel::tabulate ostream &  out = cout,
bool  print_on_zero = true
const
 

Tabulates the kernel in "out" stream.

Each of the possible values of the kernel variables set are printed together with the result of "compute". Function not allowed for non-discretized continuous variables.
If the parameter {print_on_zero} is set to {false}, cases having O as probability value are not written

void plKernel::test_draw const unsigned int  number_of_tests,
const string &  file_name,
const plValues initial_state,
const vector< plFloat > &  proposal_standard_deviation,
unsigned int  n
 

Generates a test for the kernel consisting in {number } random trays (this trays are generated by using the draw() method).

The result is a gnuplot file of name {file }. A graph can be viewed by making { >gnuplot file } in a shell. If your distribution contains multiple variables a graph will be generated for each variable. At the top of each of the graphs you will find the following information : (i) the variable name, (ii)the average, (iii) the number of values out of range (this number must be 0 otherwise it means that your draw method is generating wrong values), (iv) the number of trays used in the statistics. Parameters "initial_state", "proposal_standard_deviation", and "n" are only used when drawing non-compiled kernel (i.e. using Metropolis algorithm). They represent:

  • initial_state: the initial point from which the Metropolis sampler will start.
  • proposal_standard_deviation: The standard deviations of the normals that will be used when generating Metropolis candidate points.
  • n: the number of steps that the Metropolis sampler will run before returning a drawn point.

void plKernel::test_draw const unsigned int  number_of_tests,
const string &  file_name
 

Generates a test for the kernel consisting in {number } random trays (this trays are generated by using the draw() method).

The result is a gnuplot file of name {file }. A graph can be viewed by making { >gnuplot file } in a shell. If your distribution contains multiple variables a graph will be generated for each variable. At the top of each of the graphs you will find the following information : (i) the variable name, (ii)the average, (iii) the number of values out of range (this number must be 0 otherwise it means that your draw method is generating wrong values), (iv) the number of trays used in the statistics.

void plKernel::time_best vector< long double > &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL long double vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best vector< double > &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL double vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best vector< float > &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL float vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best vector< unsigned int > &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL unsigned integer vector.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best vector< int > &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an STL integer vector.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::time_best long double &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type long double.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::time_best double &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type double.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::time_best float &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type float.

Attention mainly used with one variable kernels. For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::time_best long int &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type long integer.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::time_best unsigned int &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type unsigned integer.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::time_best int &  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a variable of type integer.Attention mainly used with one variable kernels.

For two or more variables kernels the first variable value will be copied at { parameter} while the others will be ignored.

void plKernel::time_best long double *  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a long double array.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best float *  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a float array.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best long int *  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a long integer array.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best unsigned int *  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in an unsigned integer array.

The size of { parameter} must be at least the number of parameters.

void plKernel::time_best int *  parameter,
double  time_in_seconds
const
 

Optimizes the function by running an optimization algorithm for {time_in_seconds} seconds and returns the function variables values that executes that optimization in a integer array.

The size of { parameter} must be at least the number of parameters.

plKernel plKernel::time_compile double  time_in_seconds,
plGeneratorType  generator_type = PL_MC_GENERATOR,
plCompiledDistributionType  compliled_distrib_type = PL_MAP
const
 

Does a time_compile(), and returns the compiled kernel.

See time_compile() above for details.

Note that this method returns a freshly created object. If you are calling it in a loop, consider using the version that modifies an existing object instead.

void plKernel::time_compile plKernel result,
double  time_in_seconds,
plGeneratorType  generator_type = PL_MC_GENERATOR,
plCompiledDistributionType  compiled_distrib_type = PL_MAP
const
 

Compiles the kernel by sampling it using a set of points in the variables space.

The used points may be generated using 4 possible methods (according to the value of generator_type):
1) Using all points of the discrete or discretized variables space (PL_EXHAUSTIVE_GENERATOR)
2) Generating, for {time_in_seconds} seconds, a set of points at random from the variables space (PL_RANDOM_GENERATOR)
3) Generating, for {time_in_seconds} seconds, a set of points using a Monte Carlo generator from the variables space (PL_MC_GENERATOR). It's the default value.
4) Generating, for {time_in_seconds} seconds, a set of points using a Genetic Algorithm generator from the variables space (PL_GA_GENERATOR).

The result of the compilation is stored as (according to the value of compiled_distrib_type):
1) a table (PL_TABLE).
2) an MRBT (PL_MRBT).
3) a map (PL_MAP) for non-null values. It's the default value


The documentation for this class was generated from the following file:
Generated on Fri Apr 1 10:59:03 2005 for ProBT by  doxygen 1.4.1