Jpp  18.5.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
JFIT::JRegressorStorage< JLine3Z, JGandalf > Struct Template Reference

Template specialisation for storage for PDF tables. More...

#include <JRegressorHelper.hh>

Inheritance diagram for JFIT::JRegressorStorage< JLine3Z, JGandalf >:
JFIT::JRegressorHelper< JLine3Z, JGandalf > JFIT::JRegressor< JLine3Z, JGandalf >

Public Types

typedef JTOOLS::JSplineFunction1S_t JFunction1D_t
 
typedef JTOOLS::JMAPLIST
< JTOOLS::JPolint1FunctionalMap,
JTOOLS::JPolint0FunctionalGridMap,
JTOOLS::JPolint0FunctionalGridMap >
::maplist 
JPDFMaplist_t
 
typedef JPHYSICS::JPDFTable
< JFunction1D_t, JPDFMaplist_t
JPDF_t
 time dependent PDF More...
 
typedef JTOOLS::JMAPLIST
< JTOOLS::JPolint1FunctionalMapH,
JTOOLS::JPolint1FunctionalGridMap,
JTOOLS::JPolint1FunctionalGridMap >
::maplist 
JNPEMaplist_t
 
typedef JPHYSICS::JNPETable
< double, double,
JNPEMaplist_t
JNPE_t
 time integrated PDF More...
 
typedef JPDF_t::transformer_type transformer_type
 
typedef std::array< JPDF_t,
NUMBER_OF_PDFS
JPDFs_t
 PDFs. More...
 
typedef std::array< JNPE_t,
NUMBER_OF_PDFS
JNPEs_t
 NPEs. More...
 

Public Member Functions

 JRegressorStorage ()
 Default constructor. More...
 
 JRegressorStorage (const std::string &fileDescriptor, const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10)
 Constructor. More...
 
const JPDFs_tgetPDF () const
 Get PDFs. More...
 
const JNPEs_tgetNPE () const
 Get NPEs. More...
 
void transform (const transformer_type &transformer)
 Transform PDFs and NPEs. More...
 
void setRmax (const double Rmax)
 Set maximal road width of PDF. More...
 

Static Public Attributes

static const int NUMBER_OF_PDFS = 6
 Number of PDFs. More...
 
static const JPDFType_t pdf_t [NUMBER_OF_PDFS]
 PDF types. More...
 

Private Attributes

JPDFs_t _pdf
 PDFs. More...
 
JNPEs_t _npe
 NPEs. More...
 

Detailed Description

template<>
struct JFIT::JRegressorStorage< JLine3Z, JGandalf >

Template specialisation for storage for PDF tables.

Definition at line 106 of file JRegressorHelper.hh.

Member Typedef Documentation

Definition at line 57 of file JRegressorHelper.hh.

Definition at line 60 of file JRegressorHelper.hh.

time dependent PDF

Definition at line 61 of file JRegressorHelper.hh.

Definition at line 65 of file JRegressorHelper.hh.

time integrated PDF

Definition at line 66 of file JRegressorHelper.hh.

Definition at line 68 of file JRegressorHelper.hh.

PDFs.

Definition at line 72 of file JRegressorHelper.hh.

NPEs.

Definition at line 73 of file JRegressorHelper.hh.

Constructor & Destructor Documentation

Default constructor.

Definition at line 112 of file JRegressorHelper.hh.

113  {}
JFIT::JRegressorStorage< JLine3Z, JGandalf >::JRegressorStorage ( const std::string fileDescriptor,
const double  TTS,
const int  numberOfPoints = 25,
const double  epsilon = 1.0e-10 
)
inline

Constructor.

The PDF file descriptor should contain the wild card character JPHYSICS::WILDCARD which will be replaced by the corresponding PDF types listed in JRegressor<JLine3Z, JGandalf>::pdf_t.

The TTS corresponds to the additional time smearing applied to the PDFs.

Parameters
fileDescriptorPDF file descriptor
TTSTTS [ns]
numberOfPointsnumber of points for Gauss-Hermite integration of TTS
epsilonprecision for Gauss-Hermite integration of TTS

Definition at line 129 of file JRegressorHelper.hh.

133  {
134  using namespace std;
135  using namespace JPP;
136 
137  const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
138 
139  for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
140 
141  const string file_name = getFilename(fileDescriptor, pdf_t[i]);
142 
143  _pdf[i].load(file_name.c_str());
144 
145  _pdf[i].setExceptionHandler(supervisor);
146  }
147 
148  // Add PDFs
149 
150  for (int i = 1; i < NUMBER_OF_PDFS; i += 2) {
151 
152  _pdf[ i ].add(_pdf[i-1]);
153 
154  JPDF_t buffer;
155 
156  _pdf[i-1].swap(buffer);
157 
158  if (TTS > 0.0) {
159  _pdf[i].blur(TTS, numberOfPoints, epsilon);
160  }
161 
162  _npe[ i ] = JNPE_t(_pdf[i]);
163  }
164  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
static const int NUMBER_OF_PDFS
Number of PDFs.
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
time integrated PDF
static const JPDFType_t pdf_t[NUMBER_OF_PDFS]
PDF types.
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
time dependent PDF
int numberOfPoints
Definition: JResultPDF.cc:22
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
Definition: JeepToolkit.hh:128
const double epsilon
Definition: JQuadrature.cc:21

Member Function Documentation

const JPDFs_t& JFIT::JRegressorStorage< JLine3Z, JGandalf >::getPDF ( ) const
inline

Get PDFs.

Returns
PDFs

Definition at line 172 of file JRegressorHelper.hh.

173  {
174  return _pdf;
175  }
const JNPEs_t& JFIT::JRegressorStorage< JLine3Z, JGandalf >::getNPE ( ) const
inline

Get NPEs.

Returns
NPEs

Definition at line 183 of file JRegressorHelper.hh.

184  {
185  return _npe;
186  }
void JFIT::JRegressorStorage< JLine3Z, JGandalf >::transform ( const transformer_type transformer)
inline

Transform PDFs and NPEs.

Parameters
transformertransformer

Definition at line 194 of file JRegressorHelper.hh.

195  {
196  for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
197  _pdf[i].transform(transformer);
198  _npe[i].transform(transformer);
199  }
200  }
static const int NUMBER_OF_PDFS
Number of PDFs.
void JFIT::JRegressorStorage< JLine3Z, JGandalf >::setRmax ( const double  Rmax)
inline

Set maximal road width of PDF.

Parameters
Rmaxroad width [m]

Definition at line 208 of file JRegressorHelper.hh.

209  {
211 
212  for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
213  if (!_pdf[i].empty()) {
214  _pdf[i].compress(range);
215  }
216  }
217  }
static const int NUMBER_OF_PDFS
Number of PDFs.
Range of values.
Definition: JRange.hh:38
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $

Member Data Documentation

PDFs.

Definition at line 221 of file JRegressorHelper.hh.

NPEs.

Definition at line 222 of file JRegressorHelper.hh.

const int JFIT::JRegressorHelper< JLine3Z, JGandalf >::NUMBER_OF_PDFS = 6
staticinherited

Number of PDFs.

Definition at line 70 of file JRegressorHelper.hh.

const JPDFType_t JFIT::JRegressorHelper< JLine3Z, JGandalf >::pdf_t
staticinherited

The documentation for this struct was generated from the following file: