    

 ## On this page

  

 

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

 Last update: 16.07.2025 

a struct which collects settings for *computeCorrelation* [More...](class_compute_correlation.xhtml#details)

## <a name="pub-methods"></a>Public Member Functions

 [check](class_compute_correlation.xhtml#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) 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. [More...](#a47c34ec1e578c2ce27cf1c5fcd0d1704)  
  [compute](class_compute_correlation.xhtml#ab08e112d95fe611e7eb25491c354d115) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) computes the correlation of multiple sets of samples with another set of scalar samples If the selected designs for two correlated quantities are different, then the minimum common range of designs is detected and used for analysis. [More...](#ab08e112d95fe611e7eb25491c354d115)  
  [ComputeCorrelation](class_compute_correlation.xhtml#a773e498496fced65aeb2fdf0d7eabd86) ([DataObjectContainer](class_data_object_container.xhtml) the\_field\_data, [DataObjectContainer](class_data_object_container.xhtml) the\_scalar\_data) constructor which sets suitable defaults for all members [More...](#a773e498496fced65aeb2fdf0d7eabd86)  
 ## <a name="pub-static-methods"></a>Static Public Member Functions

static [compute](class_compute_correlation.xhtml#af6a8a462fbadda0123a0ea51e64534a0) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), [DataObjectVector](class_data_object_vector.xhtml) data, [DataObjectVector](class_data_object_vector.xhtml) [scalar\_data](class_compute_correlation.xhtml#a0c1c80374ba4d28153ed219819d24612), string new\_quantity\_ident, string new\_design\_ident, bool [overwrite\_existing](class_compute_correlation.xhtml#ade25e60bd85c8b4abd4f5b416cae0eb9)) computes the correlation of a single set of samples with another set of scalar samples [More...](#af6a8a462fbadda0123a0ea51e64534a0)  
 ## <a name="pub-attribs"></a>Public Attributes

<a id="af22724fd9c1e0dd42ec296e4784b9df8"></a>[DataObjectContainer](class_data_object_container.xhtml) [field\_data](class_compute_correlation.xhtml#af22724fd9c1e0dd42ec296e4784b9df8) field samples   
 <a id="ab01db6dea146fd2a35511af297363e7b"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [field\_quantity\_idents](class_compute_correlation.xhtml#ab01db6dea146fd2a35511af297363e7b) the feld quantities to be analyzed. If a quantity ident does not exist in *field\_data*, no error appears.   
 <a id="a92a339e93315b87782ce1744408c370d"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [new\_design\_idents](class_compute_correlation.xhtml#a92a339e93315b87782ce1744408c370d) the new design idents for each correlation object. The dimension and index space must fit the one of *field\_quantity\_idents*   
 <a id="a30b1bcf63b9bdc707fea30bd96d70447"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [new\_quantity\_idents](class_compute_correlation.xhtml#a30b1bcf63b9bdc707fea30bd96d70447) the new quantity idents for each correlation object. The dimension and index space must fit the one of *field\_quantity\_idents*   
 <a id="ade25e60bd85c8b4abd4f5b416cae0eb9"></a>bool [overwrite\_existing](class_compute_correlation.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="a0c1c80374ba4d28153ed219819d24612"></a>[DataObjectContainer](class_data_object_container.xhtml) [scalar\_data](class_compute_correlation.xhtml#a0c1c80374ba4d28153ed219819d24612) scalar samples   
 <a id="aeff6fae62a2847852dc0cc49fa48d31d"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [scalar\_quantity\_idents](class_compute_correlation.xhtml#aeff6fae62a2847852dc0cc49fa48d31d) the scalar quantities to be analyzed. If a quantity ident does not exist in *field\_data*, no error appears.   
 <a id="details" name="details"></a>## Detailed Description

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

a struct which collects settings for *computeCorrelation*

Template Parameters TYPEthe field data type 

## Constructor &amp; Destructor Documentation

<a id="a773e498496fced65aeb2fdf0d7eabd86"></a>## [◆ ](#a773e498496fced65aeb2fdf0d7eabd86)ComputeCorrelation()

 [ComputeCorrelation](class_compute_correlation.xhtml)  ( [DataObjectContainer](class_data_object_container.xhtml)  *the\_field\_data*,    [DataObjectContainer](class_data_object_container.xhtml)  *the\_scalar\_data*   ) 

constructor which sets suitable defaults for all members

Parameters the\_field\_datathe subset of field data to be token as input. the\_scalar\_datathe subset of scalar data to be token as input. All quantity idents are extracted. Then all n field quantities is put into correlation with all m scalar quantities (n\*m new objects will be computed!). As a default, the new correlation field objects are appended to the field data quantities as individual designs. The design name is "correlation\[scalar\_quantity\_ident\]". 



## 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="af6a8a462fbadda0123a0ea51e64534a0"></a>## [◆ ](#af6a8a462fbadda0123a0ea51e64534a0)compute() \[1/2\]

 static compute  ( [Structure](class_structure.xhtml)  *database*,    [DataObjectVector](class_data_object_vector.xhtml)  *data*,    [DataObjectVector](class_data_object_vector.xhtml)  *scalar\_data*,    string  *new\_quantity\_ident*,    string  *new\_design\_ident*,    bool  *overwrite\_existing*   )   static 

computes the correlation of a single set of samples with another set of scalar samples

Parameters databasethe output object is to be inserted in this object dataa vector of field samples scalar\_dataa vector of scalar samples new\_quantity\_identthe quantity ident of the new object new\_design\_identthe design ident of the new object overwrite\_existingdefines if any result quantities may be overwritten 



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

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

computes the correlation of multiple sets of samples with another set of scalar samples If the selected designs for two correlated quantities are different, then the minimum common range of designs is detected and used for analysis.

Parameters databasethe output object where new objects are added to