> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RandomFieldDecompositionFromSamples Class Reference

Part of [Field models](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__fieldmodels)

Decomposition of one or multiple random fields.

## Public Types

| Type | Name |
| - | - |
| enum | [eShapeMethod](#a338b0447773d59620abdb12cb263ab2c) \{ [EXACT\_SVD](#a338b0447773d59620abdb12cb263ab2cae43d084e09a66f2f917da7499b8bf75b) = 0, [RED\_SVD](#a338b0447773d59620abdb12cb263ab2ca2b0b869756b3660156a4968de9f97f16), [BDC\_SVD](#a338b0447773d59620abdb12cb263ab2cabaabae290ac4993db4140a99c4002162) } an enum type for the algorithm computing the shapes |

## Public Member Functions

| Type | Name |
| - | - |
| | [check](#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#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. |
| | [compute](#ab08e112d95fe611e7eb25491c354d115) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b)) Performs the reduction of a random field for multiple sets of samples. |
| | [RandomFieldDecompositionFromSamples](#a386de644919efc27d9549c7f74f14447) () default constructor |

## Public Attributes

| Type | Name |
| - | - |
| [eShapeMethod](#a338b0447773d59620abdb12cb263ab2c) | [algorithm](#a51c72fc5bd4b724a7c9da7d23003cb19) Defines how the shapes are computed. |
|  bool | [compute\_amplitudes](#a742029aafb7d073a5f64c43e6110d320) If this is true, then also the amplitudes are computed (a single amplitude per shape per sample). |
|  bool | [compute\_cumulative\_variations](#a90e0662e0da2173b7b39687519f6653a) true, if the cumulative variations are to be computed |
|  bool | [compute\_variations](#a6ff9b92e10644b70006b0bb16db05514) true, if the individual variations are to be computed |
|  bool | [cross\_correlated](#a7a8f56ebcc6ac6da7e51a59f2e84e19b) True if the selected fields are assumed to be cross-correlated, else (default): each field is decomposed individually. |
|  number | [desired\_variation](#a5ecc81a378f43a9771f33fde41beab13) the desired variation (when reducing the model; 0\<x\<1). Default: 0.90 |
| [MultivariateDistributionTypes::enum\_type](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_multivariate_distribution_types.md#af7ca783694e51f78ef01ceb1e00104c5) | [distribution\_type](#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. |
| [DataObjectContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_container.md) | [element\_data](#a0a142faa1cc762466b884ad3c8979f3a) the data set to be analyzed |
| [DataObjectIdentMap](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ident_map.md) | [element\_data\_bounds\_lower](#a61e05f5838637f78bb680882358fced2) lower bounds for ELEMENT\_DATA objects |
| [DataObjectIdentMap](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ident_map.md) | [element\_data\_bounds\_upper](#a8e8b1e2041fb43eff4895da3740e1475) upper bounds for ELEMENT\_DATA objects |
|  string | [field\_ident](#aa8f4ee0c111743fd4a01ddd2d4ba0ad3) If the random fields are cross correlated, they need to have a random field ident being associated. |
| bool | [interpolate\_missing\_items](#a80ad12816b0c0674c578048eb2fd0afe) Defines how missing items (eroded elements) are treated: |
|  number | [max\_number](#a71834b001cda26914823c8b04b030cb4) the maximum number of vectors to be computed. Default: 20 |
| [DataObjectContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_container.md) | [node\_data](#a4b3543f31398671628dd711c98a0d37e) the data set to be analyzed |
| [DataObjectIdentMap](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ident_map.md) | [node\_data\_bounds\_lower](#a4daf14138081bb59a56ae0f6bd7e9372) lower bounds for NODE\_DATA objects |
| [DataObjectIdentMap](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ident_map.md) | [node\_data\_bounds\_upper](#a40ee023b9bc77310d0cb1226fa24137d) upper bounds for NODE\_DATA objects |
|  bool | [overwrite\_existing](#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. |
| [DataObjectContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_container.md) | [scalar\_data](#a0c1c80374ba4d28153ed219819d24612) the data set to be analyzed |
| [DataObjectIdentMap](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ident_map.md) | [scalar\_data\_bounds\_lower](#ad43c00cd08acd216d3d4a87bcbda1d8b) lower bounds for SCALAR\_DATA objects |
| [DataObjectIdentMap](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ident_map.md) | [scalar\_data\_bounds\_upper](#a75ffd31fa74ec6b24835e4d2f199427b) upper bounds for SCALAR\_DATA objects |

## Detailed Description

Decomposition of one or multiple random fields.

## Member Enumeration Documentation

### eShapeMethod

```cpp theme={null}
enum eShapeMethod
```

an enum type for the algorithm computing the shapes

| Enumerator | |
| - | - |
| EXACT\_SVD | exact full SVD (default up to SoS 7) |
| RED\_SVD | reduced SVD (still needs full memory, but is much faster and less accurate) |
| BDC\_SVD | exact SVD using a divide/conquer iterative algorithm (new default) |

## Member Function Documentation

### check()

```cpp theme={null}
check(Structure 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**

| Name | Description |
| - | - |
| database | the SoS structure |

### compute()

```cpp theme={null}
compute(Structure database)
```

Performs the reduction of a random field for multiple sets of samples.

**Parameters**

| Name | Description |
| - | - |
| database | The output object where new objects are added to |

## Member Data Documentation

### interpolate\_missing\_items

```cpp theme={null}
bool interpolate_missing_items
```

Defines how missing items (eroded elements) are treated:

* true: use the interpolated value
* false: assume the mean value
