    

 ## On this page

  

 

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

 Last update: 16.07.2025 

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

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

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

 [check](class_piecewise_constant_model.xhtml#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) checks the settings on plausibility [More...](#a47c34ec1e578c2ce27cf1c5fcd0d1704)  
  [compute](class_piecewise_constant_model.xhtml#ab08e112d95fe611e7eb25491c354d115) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) does the action [More...](#ab08e112d95fe611e7eb25491c354d115)  
  [PiecewiseConstantModel](class_piecewise_constant_model.xhtml#a55cbb33de43b306528f8bba14651db89) ([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...](#a55cbb33de43b306528f8bba14651db89)  
 ## <a name="pub-attribs"></a>Public Attributes

<a id="a6008fdd8bc9379f4a074ccf57abd1cbe"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [bounds\_lower](class_piecewise_constant_model.xhtml#a6008fdd8bc9379f4a074ccf57abd1cbe) lower bounds (may be an empty pointer)   
 <a id="ac0b91270e206e0b5236cc4d17a215d56"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [bounds\_upper](class_piecewise_constant_model.xhtml#ac0b91270e206e0b5236cc4d17a215d56) upper bounds (may be an empty pointer)   
 <a id="a0c6e3d3e7e9a9245af75b6f9ef2f5c76"></a>[MultivariateDistributionTypes::enum\_type](class_multivariate_distribution_types.xhtml#af7ca783694e51f78ef01ceb1e00104c5) [distribution\_type](class_piecewise_constant_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="a071ffc5c9bc6ab830900c5727e1392c1"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [mean](class_piecewise_constant_model.xhtml#a071ffc5c9bc6ab830900c5727e1392c1) mean value of the field   
 <a id="ade25e60bd85c8b4abd4f5b416cae0eb9"></a>bool [overwrite\_existing](class_piecewise_constant_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_piecewise_constant_model.xhtml#a0bbf72a5fdb5d02b186d0cf2392939f2) the ident of the quantity for which the random field is to be generated   
 <a id="af24a4523c727241b8dc9d7114f595c30"></a>[DataObjectPtr](class_data_object_ptr.xhtml) [stddev](class_piecewise_constant_model.xhtml#af24a4523c727241b8dc9d7114f595c30) standard deviation of the field   
 <a id="details" name="details"></a>## Detailed Description

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

Provides random field models.

Template Parameters TYPEthe field data typeThis class provides a field parameterization similar to random field correlation models. The basic idea is that one creates "tents" around given support points. The tent is actually given through an autocorrelation function (governed by a correlation length parameter) centered around each support point. The supports are defined through sets.

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="a55cbb33de43b306528f8bba14651db89"></a>## [◆ ](#a55cbb33de43b306528f8bba14651db89)PiecewiseConstantModel()

 [PiecewiseConstantModel](class_piecewise_constant_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\_set\_part\_identthe part ident of the given set of supports the\_set\_identthe ident of the given set of supports 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