    

 ## On this page

  

 

 # RandomFieldModel&lt; TYPE &gt; Class Template Reference

 Last update: 16.07.2025 

Provides random field models. [More...](class_random_field_model.xhtml#details)

## <a name="pub-types"></a>Public Types

<a id="ae4d13ee9cee1411b69a1ffd9af194792"></a>typedef boost::function&lt; number([TVector3](class_random_field_model.xhtml#ac0d670e6fce88a32ba09b94ee2986486) x, [TVector3](class_random_field_model.xhtml#ac0d670e6fce88a32ba09b94ee2986486) y)&gt; [TCorrelationFunction](class_random_field_model.xhtml#ae4d13ee9cee1411b69a1ffd9af194792) a function which is called to analyze the correlation   
 <a id="a21c6585e88c32a52212d4ac105eb39ff"></a>typedef std::vector&lt; number &gt; [TDoubleVector](class_random_field_model.xhtml#a21c6585e88c32a52212d4ac105eb39ff) a vector of floating point numbers   
 <a id="ac0d670e6fce88a32ba09b94ee2986486"></a>typedef Eigen::Vector3d [TVector3](class_random_field_model.xhtml#ac0d670e6fce88a32ba09b94ee2986486) a 3D vector type   
 ## <a name="pub-methods"></a>Public Member Functions

 [check](class_random_field_model.xhtml#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) checks the settings on plausibility [More...](#a47c34ec1e578c2ce27cf1c5fcd0d1704)  
  [compute](class_random_field_model.xhtml#ab08e112d95fe611e7eb25491c354d115) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) does the action [More...](#ab08e112d95fe611e7eb25491c354d115)  
  [RandomFieldModel](class_random_field_model.xhtml#ace13351ede0c8b63e0a5be83e7684940) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), string the\_quantity\_ident, [DataObjectPtr](class_data_object_ptr.xhtml) the\_mean, [DataObjectPtr](class_data_object_ptr.xhtml) the\_stddev) default constructor [More...](#ace13351ede0c8b63e0a5be83e7684940)  
  [setExponentialCorrelation](class_random_field_model.xhtml#a7f2216977cc501be2e472a247d24271d) (number length) Defines the correlation model in standard-normal space being a simple exponential one using the distance between two points. [More...](#a7f2216977cc501be2e472a247d24271d)  
  [setSquaredExponentialCorrelation](class_random_field_model.xhtml#a0fb1b39a30ea9919c30896528c9f711c) (number length) Defines the correlation model in standard-normal space being an exponential one using the squared distance between two points. [More...](#a0fb1b39a30ea9919c30896528c9f711c)  
 ## <a name="pub-attribs"></a>Public Attributes

<a id="a6008fdd8bc9379f4a074ccf57abd1cbe"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [bounds\_lower](class_random_field_model.xhtml#a6008fdd8bc9379f4a074ccf57abd1cbe) lower bounds (may be an empty pointer)   
 <a id="ac0b91270e206e0b5236cc4d17a215d56"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [bounds\_upper](class_random_field_model.xhtml#ac0b91270e206e0b5236cc4d17a215d56) upper bounds (may be an empty pointer)   
 <a id="a90e0662e0da2173b7b39687519f6653a"></a>bool [compute\_cumulative\_variations](class_random_field_model.xhtml#a90e0662e0da2173b7b39687519f6653a) true, if the cumulative variations are to be computed   
 <a id="a6ff9b92e10644b70006b0bb16db05514"></a>bool [compute\_variations](class_random_field_model.xhtml#a6ff9b92e10644b70006b0bb16db05514) true, if the individual variations are to be computed   
 <a id="a5ecc81a378f43a9771f33fde41beab13"></a>number [desired\_variation](class_random_field_model.xhtml#a5ecc81a378f43a9771f33fde41beab13) the desired variation (when reducing the model; 0&lt;x&lt;1). Default: 0.9   
 <a id="a0c6e3d3e7e9a9245af75b6f9ef2f5c76"></a>[MultivariateDistributionTypes::enum\_type](class_multivariate_distribution_types.xhtml#af7ca783694e51f78ef01ceb1e00104c5) [distribution\_type](class_random_field_model.xhtml#a0c6e3d3e7e9a9245af75b6f9ef2f5c76) The ident of the probability distribution that is assumed to convert data from original space to Gaussian. If empty (default), then it is automatically chosen.   
 <a id="a71834b001cda26914823c8b04b030cb4"></a>number [max\_number](class_random_field_model.xhtml#a71834b001cda26914823c8b04b030cb4) the maximum number of vectors to be computed. Default: 5   
 <a id="a071ffc5c9bc6ab830900c5727e1392c1"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [mean](class_random_field_model.xhtml#a071ffc5c9bc6ab830900c5727e1392c1) mean value of the field   
 <a id="ade25e60bd85c8b4abd4f5b416cae0eb9"></a>bool [overwrite\_existing](class_random_field_model.xhtml#ade25e60bd85c8b4abd4f5b416cae0eb9) Is true if already existing output data objects will be replaced. In this case, also all depending objects of the already existing one will be deleted.   
 <a id="a0bbf72a5fdb5d02b186d0cf2392939f2"></a>string [quantity\_ident](class_random_field_model.xhtml#a0bbf72a5fdb5d02b186d0cf2392939f2) the ident of the quantity for which the random field is to be generated   
 <a id="a46d5ac75b96c0be73dfef4955cec41ac"></a>size\_t [seed](class_random_field_model.xhtml#a46d5ac75b96c0be73dfef4955cec41ac) the initial random seed used for random number generators used internally.   
 <a id="af24a4523c727241b8dc9d7114f595c30"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [stddev](class_random_field_model.xhtml#af24a4523c727241b8dc9d7114f595c30) standard deviation of the field   
 <a id="a36cd5d971bf3ecc306f0bb6f3b6380d4"></a>number [sub\_space\_dimension](class_random_field_model.xhtml#a36cd5d971bf3ecc306f0bb6f3b6380d4) the sub space dimension This is the number of points in sub space for which the full and dense correlation matrix is created. Must not be too large. Absolute maximum (on 64 bit CPUs): 16000. Recommended maximum: 2000.   
 <a id="details" name="details"></a>## Detailed Description

### template&lt;dataobject\_types TYPE&gt;  
class RandomFieldModel&lt; TYPE &gt;

Provides random field models.

Template Parameters TYPEthe field data typeThis class provides random field correlation models. Herein, the required information to simulate random fields (scatter shapes, distribution information etc.) are based on a simple numerical model assumption. Such models may be used if there is not sufficient data available for the estimation of the true correlation structure.

The correlation models employed here refer to the correlation matrix that is created after transforming the field marginal CDF to standard normal space.



## Constructor &amp; Destructor Documentation

<a id="ace13351ede0c8b63e0a5be83e7684940"></a>## [◆ ](#ace13351ede0c8b63e0a5be83e7684940)RandomFieldModel()

 [RandomFieldModel](class_random_field_model.xhtml)  ( [Structure](class_structure.xhtml)  *database*,    string  *the\_quantity\_ident*,    [DataObjectPtr](class_data_object_ptr.xhtml)  *the\_mean*,    [DataObjectPtr](class_data_object_ptr.xhtml)  *the\_stddev*   ) 

default constructor

Parameters databasethe database where all data is stored into the\_quantity\_identsets quantity\_ident the\_meansets mean the\_stddevsets stddev 



## Member Function Documentation

<a id="a47c34ec1e578c2ce27cf1c5fcd0d1704"></a>## [◆ ](#a47c34ec1e578c2ce27cf1c5fcd0d1704)check()

 check  ( [Structure](class_structure.xhtml)  *database*) 

checks the settings on plausibility

It throws an exception if there is a problem with the settings. Important: It tries to find out all problems with these settings and then exits the routine.

Parameters databasethe SoS structure 



<a id="ab08e112d95fe611e7eb25491c354d115"></a>## [◆ ](#ab08e112d95fe611e7eb25491c354d115)compute()

 compute  ( [Structure](class_structure.xhtml)  *database*) 

does the action

Parameters databasethe database where all data is stored into 



<a id="a7f2216977cc501be2e472a247d24271d"></a>## [◆ ](#a7f2216977cc501be2e472a247d24271d)setExponentialCorrelation()

 setExponentialCorrelation  ( number  *length*) 

Defines the correlation model in standard-normal space being a simple exponential one using the distance between two points.

Parameters lengththe correlation length (as absolute number) 



<a id="a0fb1b39a30ea9919c30896528c9f711c"></a>## [◆ ](#a0fb1b39a30ea9919c30896528c9f711c)setSquaredExponentialCorrelation()

 setSquaredExponentialCorrelation  ( number  *length*) 

Defines the correlation model in standard-normal space being an exponential one using the squared distance between two points.

Parameters lengththe correlation length (as absolute number)