ALTA  alpha
Public Member Functions | List of all members
lafortune_function Class Reference

Detailed Description

A lafortune lobe is defined as \(k_d + (L^T M V)^n\). We fit the restricted version where the M matrix is diagonal of coefficients \((Cx, Cy, Cz)\)

Todo:
Fitting the diffuse part is not stable
Author
Laurent Belcour <laure.nosp@m.nt.b.nosp@m.elcou.nosp@m.r@um.nosp@m.ontre.nosp@m.al.c.nosp@m.a>

#include <function.h>

Collaboration diagram for lafortune_function:
Collaboration graph
[legend]

Public Member Functions

 lafortune_function (const parameters &params)
 
virtual vec operator() (const vec &x) const
 
virtual vec value (const vec &x) const
 
virtual vec value (const vec &x, const vec &p)
 
virtual bool load (std::istream &in)
 Load function specific files.
 
void save_body (std::ostream &out, const arguments &args) const
 save function specific data. This has no use for ALTA exportbut allows to factorize the code in the C++ or matlab export by defining function calls that are common to all the plugins. More...
 
void save_call (std::ostream &out, const arguments &args) const
 default non_linear export. It will dump the parameters in order but won't assign names for the function nor parameters.
 
virtual void bootstrap (const ptr< data > d, const arguments &args)
 Boostrap the function by defining the diffuse term.
 
virtual int nbParameters () const
 Number of parameters to this non-linear function.
 
virtual vec parameters () const
 Get the vector of parameters for the function.
 
virtual void setParameters (const vec &p)
 Update the vector of parameters for the function.
 
virtual vec parametersJacobian (const vec &x) const
 Obtain the derivatives of the function with respect to the parameters. More...
 
virtual params::input parametrization () const
 Provide the parametrization of the input space of the function. For this one, we fix that the parametrization is in THETAD_PHID.
 
virtual void setParametrization (params::input new_param)
 
void setNbLobes (int N)
 Set the number of lobes to be used in the fit.
 
- Public Member Functions inherited from alta::nonlinear_function
 nonlinear_function (const parameters &params)
 
virtual void bootstrap (const ptr< data >, const arguments &args)
 Provide a first rough fit of the function. More...
 
virtual vec getParametersMax () const
 get the maximum value for all the parameters in a vector format. The maximum vector and the parameter vector have the same indexing.
 
virtual vec getParametersMin () const
 get the minimum value for all the parameters in a vector format. The minimum vector and the parameter vector have the same indexing.
 
- Public Member Functions inherited from alta::function
 function (const parameters &params)
 
virtual ~function ()
 Destructor function needed when using shared_ptr.
 
virtual void save (const std::string &filename, const arguments &args) const
 Save the current function to a specific file type, args can be used to differenciate the type of export. More...
 
virtual void save_header (std::ostream &out, const arguments &args) const
 save the header of the output function file. The header should store general information about the fit such as the command line used the dimension of the fit. L2 and L_inf distance could be added here.
 
double L2_distance (const ptr< data > &d) const
 L2 norm to data. More...
 
double Linf_distance (const ptr< data > &d) const
 Linf norm to data. More...
 
virtual void setMin (const vec &min)
 
virtual void setMax (const vec &max)
 
virtual vec min () const
 
virtual vec max () const
 
const parametersparametrization () const
 
void setParametrization (const parameters &p)
 

Additional Inherited Members

- Protected Attributes inherited from alta::function
parameters _parameters
 
vec _min
 
vec _max
 

Member Function Documentation

vec lafortune_function::parametersJacobian ( const vec &  x) const
virtual

Obtain the derivatives of the function with respect to the parameters.

Implements alta::nonlinear_function.

void lafortune_function::save_body ( std::ostream &  out,
const arguments args 
) const
virtual

save function specific data. This has no use for ALTA export but allows to factorize the code in the C++ or matlab export by defining function calls that are common to all the plugins.

Reimplemented from alta::function.


The documentation for this class was generated from the following files: