> ## 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.

# RandomFieldGroup Class Reference

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

A group of random fields belonging together (either a single random field, or multiple cross-correlated fields)

## Public Types

| Type | Name |
| - | - |
|  typedef std::list\< [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) > | [TElementRandomFieldDataContainer](#afc7a5c2587087d5a8d8aff3cbd785fde) a container of random field data |
|  typedef std::list\< [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) > | [TIntptRandomFieldDataContainer](#a7b3ec71aa7f93581b2db2e02b1c0fa7c) a container of random field data |
|  typedef std::list\< [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) > | [TNodeRandomFieldDataContainer](#a513c1fdc00cecd99a7a985d5d501ebcd) a container of random field data |
|  typedef std::list\< [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) > | [TScalarRandomFieldDataContainer](#a049fa7126e2211f4a1ea0f5b4d280ae9) a container of random field data |

## Public Member Functions

| Type | Name |
| - | - |
| template\<dataobject\_types TYPE> | [add](#ae7cd02d902e2bb54ebea09284bb037a7) ([RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) field, [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)) adds the given random field data to this group |
| string | [amplitudeIdent](#ae484c523b99de434cd5fe210340df0bb) (number i\_shape) computes the amplitude ident of this group for a given shape number |
| | [computeCumulativeVariations](#a8899131da559a91e9d1498e35973fdb7) ([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)) computes cumulative local variations and stores them in m\_variations\_cumulative |
| | [computeIndividualVariations](#adc08678a972a21a848bdd8307a8aaec8) ([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)) computes individual local variations and stores them in m\_variations\_individual |
| | [copyToDatabase](#a0ec04e9e17dee09820302a852e62162b) ([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), bool overwrite\_existing) copies contained data to the database (being visible in data object table) |
| | [eraseDatabaseCopies](#a37662babd77d3217b300cc31a4ddf4af) ([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)) deletes all data objects contained in this data structure from the respective database. |
| template\<dataobject\_types TYPE> bool | [exists](#a7b7a93d7e8126850586e832f2e6bfafe) (string quantity) |
| template\<dataobject\_types TYPE> std::list\< [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) > | [fields](#adbe04bfccbb9a1190215764b1cd337e9) () |
| template\<dataobject\_types TYPE> [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) | [findData](#ab66dbca5f2893866d088431c620a4be3) (string quantity) |
| template\<dataobject\_types TYPE> [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) | [findDataRef](#aabf674dceac157a34990ff653f45b8fd) (string quantity) |
| Eigen::VectorXd | [getVariationOfShapes](#a43e769e7be555c8dcf4aa3d0d458a47c) () |
| number | [getVariationTotal](#ad243d67623eb57a4a95e175e464f4706) () |
| string | [ident](#ad788420ef7464c550bfffb4e280eb417) () |
| bool | [isGroup](#ac6e1d47f61e13d3083fd03120ec8881f) () |
| bool | [isSingle](#a798f429a8eba44cef1e0c5e8f7a58f3d) () |
| bool | [isValid](#afe93e17ac89cd97917811068ba2af214) () |
| int | [numShapes](#a97a6c42ecf5bf83fbdaec77d3fd07d60) () |
| bool | [overlaps](#a14dccff2927c8871b6e977f3de4da6e8) ([RandomFieldGroup](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_group.md) field) |
| | [RandomFieldGroup](#a21e87a5c9be5da8e30b6bf6606bda796) () default constructor |
| | [RandomFieldGroup](#ac8bd96737e4db2feb1dce27992f5ced7) ([RandomFieldGroup](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_group.md) other) copy constructor |
| string | [readableIdent](#aed3bcd7430e07631258a658baf83259d) () |
| | [setIdent](#a26177040e50ece2fde7ee91ba2c7df97) (string [ident](#ad788420ef7464c550bfffb4e280eb417), [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)) sets m\_ident |
| | **template** (findNodeData) [findData](#ab66dbca5f2893866d088431c620a4be3)\< [NODE\_DATA](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gga1bebf1e22deb3cd41d7d99ddcdb15379a2bccb499db6de63e558b75b39da3d482) > |
| | **template** (findElementData) [findData](#ab66dbca5f2893866d088431c620a4be3)\< [ELEMENT\_DATA](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gga1bebf1e22deb3cd41d7d99ddcdb15379ae9445a58a2c3cd515f2058cbd3117174) > |
| | **template** (findScalarData) [findData](#ab66dbca5f2893866d088431c620a4be3)\< [SCALAR\_DATA](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gga1bebf1e22deb3cd41d7d99ddcdb15379a916fc40dfca5ba301488a121abe77495) > |
| | **template** (findNodeDataRef) [findDataRef](#aabf674dceac157a34990ff653f45b8fd)\< [NODE\_DATA](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gga1bebf1e22deb3cd41d7d99ddcdb15379a2bccb499db6de63e558b75b39da3d482) > |
| | **template** (findElementDataRef) [findDataRef](#aabf674dceac157a34990ff653f45b8fd)\< [ELEMENT\_DATA](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gga1bebf1e22deb3cd41d7d99ddcdb15379ae9445a58a2c3cd515f2058cbd3117174) > |
| | **template** (findScalarDataRef) [findDataRef](#aabf674dceac157a34990ff653f45b8fd)\< [SCALAR\_DATA](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gga1bebf1e22deb3cd41d7d99ddcdb15379a916fc40dfca5ba301488a121abe77495) > |

## Detailed Description

A group of random fields belonging together (either a single random field, or multiple cross-correlated fields)

## Constructor & Destructor Documentation

### RandomFieldGroup()

```cpp theme={null}
RandomFieldGroup(RandomFieldGroup other)
```

copy constructor

**Parameters**

| Name | Description |
| - | - |
| other | the object to be copied |

## Member Function Documentation

### add()

```cpp theme={null}
add(
    RandomFieldData field,
    Structure * database
)
```

adds the given random field data to this group

**Parameters**

| Name | Description |
| - | - |
| field | the field data to be added to this group |
| database | if not zero, then the connected listeners will be notified on changing the random field models |

### amplitudeIdent()

```cpp theme={null}
string amplitudeIdent(number i_shape)
```

computes the amplitude ident of this group for a given shape number

**Parameters**

| Name | Description |
| - | - |
| i\_shape | shape number (0..n-1) |

**Returns**

the quantity ident of the respective amplitude

### computeCumulativeVariations()

```cpp theme={null}
computeCumulativeVariations(Structure * database)
```

computes cumulative local variations and stores them in m\_variations\_cumulative

**Parameters**

| Name | Description |
| - | - |
| database | if not zero, then the connected listeners will be notified on changing the random field models |

### computeIndividualVariations()

```cpp theme={null}
computeIndividualVariations(Structure * database)
```

computes individual local variations and stores them in m\_variations\_individual

**Parameters**

| Name | Description |
| - | - |
| database | if not zero, then the connected listeners will be notified on changing the random field models |

### copyToDatabase()

```cpp theme={null}
copyToDatabase(
    Structure database,
    bool overwrite_existing
)
```

copies contained data to the database (being visible in data object table)

**Parameters**

| Name | Description |
| - | - |
| database | the target database |
| overwrite\_existing | if true, then data objects with identical ident will be replaced, else an exception is thrown. |

### eraseDatabaseCopies()

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

deletes all data objects contained in this data structure from the respective database.

**Parameters**

| Name | Description |
| - | - |
| database | the database to be deleted |

### exists()

```cpp theme={null}
bool exists(string quantity)
```

**Returns**

true if the fiven quantity ident is already contained

**Parameters**

| Name | Description |
| - | - |
| quantity | the quantity ident |

### fields()

```cpp theme={null}
std::list< RandomFieldData > fields()
```

**Returns**

a const-reference to the respective field container

### findData()

```cpp theme={null}
RandomFieldData findData(string quantity)
```

**Returns**

a reference to the data of the given quantity, regardless of being part of a group or a single field

**Parameters**

| Name | Description |
| - | - |
| quantity | the quantity ident |

### findDataRef()

```cpp theme={null}
RandomFieldData findDataRef(string quantity)
```

**Returns**

a non- reference to the data of the given quantity, regardless of being part of a group or a single field

**Parameters**

| Name | Description |
| - | - |
| quantity | the quantity ident |

### getVariationOfShapes()

```cpp theme={null}
Eigen::VectorXd getVariationOfShapes()
```

**Returns**

the explainable variation of each scatter shape

### getVariationTotal()

```cpp theme={null}
number getVariationTotal()
```

**Returns**

the total explainable variation

### ident()

```cpp theme={null}
string ident()
```

**Returns**

m\_ident

### isGroup()

```cpp theme={null}
bool isGroup()
```

**Returns**

true if this group represents multiple cross-correlated fields

### isSingle()

```cpp theme={null}
bool isSingle()
```

**Returns**

true if this group represents a single random field, else there are multiple cross-correlated fields

### isValid()

```cpp theme={null}
bool isValid()
```

**Returns**

true if there are any fields assigned

### numShapes()

```cpp theme={null}
int numShapes()
```

**Returns**

the number of shapes used by this group.

### overlaps()

```cpp theme={null}
bool overlaps(RandomFieldGroup field)
```

**Returns**

true if any quantity of the other field has the same ident as a quantity in this object

**Parameters**

| Name | Description |
| - | - |
| field | the other field to be tested |

### readableIdent()

```cpp theme={null}
string readableIdent()
```

**Returns**

computes a human reable ident for LOG-output purposes of this RFGroup

### setIdent()

```cpp theme={null}
setIdent(
    string ident,
    Structure * database
)
```

sets m\_ident

**Parameters**

| Name | Description |
| - | - |
| ident | the new ident |
| database | if not zero, then the connected listeners will be notified on changing the random field models |
