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

# ScalarMOP2 Class Reference

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

Represents a [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md).

## Public Member Functions

| Type | Name |
| - | - |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [activeVariables](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#aeff7712c6be709d07b90e54d33c9a83b) (::data\_handler::DataHandlerBase datahandler, uint64\_t output) Return the the variable active for the selected output. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [constantInputs](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a0072c7edd32f9b19075446dad7edc9a3) (::data\_handler::DataHandlerBase datahandler) Return the the variables inactive for all outputs (the constant inputs) |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [copInputs](#a0b81b6a4c59a313ee4a3726ef15198ff) () override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [copInputs](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#ade1a270ad8071b90c3c7f058e50c6fe4) (::data\_handler::DataHandlerBase datahandler) Compute the individual CoPs of second order for each input of given order for all outputs from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [copInputs](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a8b244b702328986d0f27bf31422fc825) (::data\_handler::DataHandlerBase datahandler, uint64\_t output) Compute the individual CoPs of second order for each input of given order for a single output from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [copInputsFirstOrder](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a64b05f1ce4c1a6a54a1722e958f6b5a7) (::data\_handler::DataHandlerBase datahandler) Compute the individual CoPs of first order for each input of given order for all outputs from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [copInputsFirstOrder](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#af448d71b8e87e16c4834a9336b0b8cd4) (::data\_handler::DataHandlerBase datahandler, uint64\_t output) Compute the individual CoPs of given order for each input of given order for a single output from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [copTotal](#a9478ebe1f21c003b6a6713f9887404a9) () override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [copTotal](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#ad3cca8494b6fe38ce6e0ae0fc1ec0ea0) (::data\_handler::DataHandlerBase datahandler) Return the total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the given datahandler. |
| number | [copTotal](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a389cab7799d534fa23da5bdf9dadf5a7) (::data\_handler::DataHandlerBase datahandler, uint64\_t output) Return the total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) of the given output the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [crossValidation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a5ca8403b074f9c323bd0083fdf23cb1a) (::data\_handler::DataHandlerBase datahandler) Returns the cross validation values. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **crossValidation** (::data\_handler::DataHandlerBase datahandler, uint64\_t output) |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [cvOutputs](#a9e570d404efb87792edb8a69468b08ea) () override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **cvOutputs** (number output) |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [evaluate](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a98b1fc2fcda4a9254ddd2aa26af5c25d) (::data\_handler::DataHandlerBase datahandler, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) values) Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values with bounds check. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [evaluate](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a7f80257761b6720ce42d765f0c92e791) (::data\_handler::DataHandlerBase datahandler, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) values, uint64\_t output) Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values. Only evaluate the given output. With bounds check. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [evaluate](#ab8c54941abc35581947aca7a9eec4a67) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) x, bool extrapolate=false) override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **evaluate** ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) x, uint64\_t output, bool extrapolate=false) override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [evaluateExtrapolate](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a69f65698745dd36dadeb1699989f2bb2) (::data\_handler::DataHandlerBase datahandler, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) values) Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values no bounds check. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [evaluateExtrapolate](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a2287b9e41a600402b5e7db0ca7108304) (::data\_handler::DataHandlerBase datahandler, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) values, uint64\_t output) Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values. Only evaluate the given output. No bounds check. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **evaluateExtrapolate** ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) x) |
| std::vector\< string > | [filterActiveSampleIds](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a883e85901256157c66e0ecbd2ab7bcb0) (::data\_handler::DataHandlerBase datahandler, std::vector\< string > sample\_ids, uint64\_t model) Return the the samples id active for the selected output from the given list of sample\_ids. |
| std::vector\< string > | [filterConstantInputNames](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a24f86122329b61107d3e1bf72d041a5f) (::data\_handler::DataHandlerBase datahandler, std::vector\< string > input\_names) Filter the list of input names such that only the constant ones are returned The Input names need to be in the order as given on the training of the [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md). |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **getFilter** () override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **getMean** () override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [getSensitivities](#a7100ac1182593b63e0add2d1b5fd337d) () override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **inputs** () |
| bool | [isValid](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a54ae75757bd7c8c3936ab036df6d18e3) (::data\_handler::DataHandlerBase datahandler) checks the settings |
| bool | [isValid](#aed2ba0e21a4f1861eb180b952c358c47) () override destructor |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [lowerBounds](#a17aa44b18ae334f8dcf88422a0c2a1ae) () override Returns a column vector of lower bound values of input parameters in DoE. |
| string | [modelDescription](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#ad04e65da7a41baf081cbf4100367de57) (::data\_handler::DataHandlerBase datahandler, std::size\_t output) Return the description of the model computing the output for the SclarMOP in the datahandler. |
| string | [modelName](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a9ae8a26a8e856cb73692244eadaa54e0) (::data\_handler::DataHandlerBase datahandler, uint64\_t output) Return the name of the model computing the output for the SclarMOP in the datahandler. |
| int | [numInputs](#af97b2d60070ccca6c53008bc806877e9) () override |
| int | [numOutputs](#a333f4531815f086a341c25c9f96031d7) () override |
| number | [numSamples](#a2c303f59c86c12698b207fc148f35354) () override |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | **outputs** () |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [predictionError](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a8fc71ccbaa1350b7f88140bf7a6ded02) (::data\_handler::DataHandlerBase datahandler) Estimate the prediction error for [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values. |
| number | [predictionError](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a356e1b51c7ff0f01849dbdd20b355238) (::data\_handler::DataHandlerBase datahandler, uint64\_t output) Estimate the prediction error for [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values for the given output. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [qualityMeasureTotal](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a5851787f9ce075375b9e0aa2934505ff) (::data\_handler::DataHandlerBase datahandler, ::quality\_measure::QualityMeasureBase quality\_measure) Return the total quality measure w\.r.t. the expected responses from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the given datahandler. |
| number | [qualityMeasureTotal](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#acaa360031f26d42e06a8f7b63b19198a) (::data\_handler::DataHandlerBase datahandler, ::quality\_measure::QualityMeasureBase quality\_measure, uint64\_t output) Return the total quality measure w\.r.t. the expected responses for the given output from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the given datahandler. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [sampleStatus](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a9403b938a192208b16bd52cd1c5b5b42) (::data\_handler::DataHandlerBase datahandler) Return the the samples active/inactive for all models. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [sampleStatus](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md#a7b607b96e2ecb071ace9443a07dab932) (::data\_handler::DataHandlerBase datahandler, uint64\_t model) Return the the samples id active for the selected output from the given list of sample\_ids. |
| | [save](#a218b0399e3457bfd38e19d93b931bf04) (string path, bool replace\_files=false) Saves the [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) to a file. |
| | [ScalarMOP2](#af84f4ac3e10254b76293d2b577b4ecb4) () default constructor. Creates an empty (unusable) [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) object. |
| | [ScalarMOP2](#acf4812bb4ced934b59d1b4637ddb7222) ([ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) other) copy constructor |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [upperBounds](#a939cb7584e25886e7b2bfa8e63b3d83c) () override Returns a column vector of upper bound values of input parameters in DoE. |
| | [writeOMDB](#a9bcf490489c0ab8bd7c03ac56b73175d) (string path, bool replace\_files=false) Writes an optiSLang monitoring database file. |

## Static Public Member Functions

| Type | Name |
| - | - |
| static [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) | [load](#a51ecdbc9e794da047bee35d361d1e94a) (string path) Loads the [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) from a file. |

## Serialization

| Type | Name |
| - | - |
|  class | **boost::serialization::access** |
| bool | [operator==](#a941ef3bf9087203b5ec8fc93e8125e94) ([ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) other) |
| [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) | [operator=](#afb3b70a636532bae75ef199f06915a09) ([ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) other) overrides the default assignment operator |

## Detailed Description

Represents a [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md).

**Copyright**

DYNARDO Austria GmbH

The meta model is a mathematical function which approximates one or multiple output quantities from values of one or multiple input quantities.

## Constructor & Destructor Documentation

### ScalarMOP2()

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

copy constructor

**Parameters**

| Name | Description |
| - | - |
| other | the [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) object to be copied from |

## Member Function Documentation

### activeVariables()

```cpp theme={null}
Matrix activeVariables(
    ::data_handler::DataHandlerBase datahandler,
    uint64_t output
)
```

`inherited`

Return the the variable active for the selected output.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The database to take the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) from |
| output | The selected output |

**Returns**

A vector of bools specifying for each input if it is active

### constantInputs()

```cpp theme={null}
Matrix constantInputs(::data_handler::DataHandlerBase datahandler)
```

`inherited`

Return the the variables inactive for all outputs (the constant inputs)

**Parameters**

| Name | Description |
| - | - |
| datahandler | The database to take the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) from |

**Returns**

A vector of bools specifying for each input if it is constant

### copInputs() \[1/3]

```cpp theme={null}
Matrix copInputs()
```

`override`

**Returns**

the individual [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of each input for each output The [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) matrix is organized as follows:

* each column corresponds to one design variable
* each row corresponds to one output variable

### copInputs() \[2/3]

```cpp theme={null}
Matrix copInputs(::data_handler::DataHandlerBase datahandler)
```

`inherited`

Compute the individual CoPs of second order for each input of given order for all outputs from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |

**Returns**

the individual [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of each input for each output The [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) matrix is organized as follows:

* each column corresponds to one design variable
* each row corresponds to one output variable

### copInputs() \[3/3]

```cpp theme={null}
Matrix copInputs(
    ::data_handler::DataHandlerBase datahandler,
    uint64_t output
)
```

`inherited`

Compute the individual CoPs of second order for each input of given order for a single output from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |
| output | The output to compute for |

**Returns**

the individual [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of each input for a single output output The [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) matrix is organized as follows:

* each column corresponds to one design variable
* each row corresponds to one output variable

### copInputsFirstOrder() \[1/2]

```cpp theme={null}
Matrix copInputsFirstOrder(::data_handler::DataHandlerBase datahandler)
```

`inherited`

Compute the individual CoPs of first order for each input of given order for all outputs from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |

**Returns**

the individual [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of each input for each output The [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) matrix is organized as follows:

* each column corresponds to one design variable
* each row corresponds to one output variable

### copInputsFirstOrder() \[2/2]

```cpp theme={null}
Matrix copInputsFirstOrder(
    ::data_handler::DataHandlerBase datahandler,
    uint64_t output
)
```

`inherited`

Compute the individual CoPs of given order for each input of given order for a single output from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |
| output | The output to compute for |

**Returns**

the individual [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of each input for a single output output The [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) matrix is organized as follows:

* each column corresponds to one design variable
* each row corresponds to one output variable

### copTotal() \[1/3]

```cpp theme={null}
Matrix copTotal()
```

`override`

**Returns**

a column vector which contains the total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) for each output variable

### copTotal() \[2/3]

```cpp theme={null}
Matrix copTotal(::data_handler::DataHandlerBase datahandler)
```

`inherited`

Return the total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the given datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |

**Returns**

The total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) of all outputs

### copTotal() \[3/3]

```cpp theme={null}
number copTotal(
    ::data_handler::DataHandlerBase datahandler,
    uint64_t output
)
```

`inherited`

Return the total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) of the given output the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |
| output | The output to compute the [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) for |

**Returns**

The total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) of given output

### crossValidation()

```cpp theme={null}
Matrix crossValidation(::data_handler::DataHandlerBase datahandler)
```

`inherited`

Returns the cross validation values.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler containing the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |

**Returns**

cross validation data from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md)

### cvOutputs()

```cpp theme={null}
Matrix cvOutputs()
```

`override`

**Returns**

a matrix which contains the cross-validated values for each output variable

### evaluate() \[1/3]

```cpp theme={null}
Matrix evaluate(
    ::data_handler::DataHandlerBase datahandler,
    Matrix values
)
```

`inherited`

Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values with bounds check.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler containing the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |
| values | The values to evaluate the scalarMOP on |

**Returns**

Values approximated by the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md)

### evaluate() \[2/3]

```cpp theme={null}
Matrix evaluate(
    ::data_handler::DataHandlerBase datahandler,
    Matrix values,
    uint64_t output
)
```

`inherited`

Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values. Only evaluate the given output. With bounds check.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler containing the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |
| values | The values to evaluate the scalarMOP on |
| output | The output to evaluate |

**Returns**

Values approximated by the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md)

### evaluate() \[3/3]

```cpp theme={null}
Matrix evaluate(
    Matrix x,
    bool extrapolate = false
)
```

`override`

**Parameters**

| Name | Description |
| - | - |
| x | the inputs to be evaluated. Each column is one set of inputs, e.g. each column represents a single design, e.g. numRows = numInputs; The input values must be be within the original sampling bounds! |
| extrapolate | Extrapolate values outside the sample boundaries |

**Returns**

matrix of output variable values as approximated by the meta model; each column represents a single design, e.g. numRows = numOutputs; numCols = x.numCols()

### evaluateExtrapolate() \[1/2]

```cpp theme={null}
Matrix evaluateExtrapolate(
    ::data_handler::DataHandlerBase datahandler,
    Matrix values
)
```

`inherited`

Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values no bounds check.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler containing the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |
| values | The values to evaluate the scalarMOP on |

**Returns**

Values approximated by the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md)

### evaluateExtrapolate() \[2/2]

```cpp theme={null}
Matrix evaluateExtrapolate(
    ::data_handler::DataHandlerBase datahandler,
    Matrix values,
    uint64_t output
)
```

`inherited`

Evaluate the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values. Only evaluate the given output. No bounds check.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler containing the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |
| values | The values to evaluate the scalarMOP on |
| output | The output to evaluate |

**Returns**

Values approximated by the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md)

### filterActiveSampleIds()

```cpp theme={null}
std::vector<string> filterActiveSampleIds(
    ::data_handler::DataHandlerBase datahandler,
    std::vector< string > sample_ids,
    uint64_t model
)
```

`inherited`

Return the the samples id active for the selected output from the given list of sample\_ids.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The database to take the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) from |
| sample\_ids | A list of sample ids corresponding to the used samples |
| model | The selected model |

**Returns**

A vector of strings representing the ids of the active samples

### filterConstantInputNames()

```cpp theme={null}
std::vector<string> filterConstantInputNames(
    ::data_handler::DataHandlerBase datahandler,
    std::vector< string > input_names
)
```

`inherited`

Filter the list of input names such that only the constant ones are returned The Input names need to be in the order as given on the training of the [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md).

**Parameters**

| Name | Description |
| - | - |
| datahandler | The database to take the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) from |
| input\_names | The names of the inputs in the order of the training |

**Returns**

A list of input names representing the constant inputs

### getSensitivities()

```cpp theme={null}
Matrix getSensitivities()
```

`override`

**Returns**

the individual [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) values of each input for each output The sensitivities matrix is organized as follows:

* The first column contains the total [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) for each output variable
* The other columns contain the [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) matrix organized as follows:

  * each column corresponds to one design variable
  * each row corresponds to one output variable

### isValid() \[1/2]

```cpp theme={null}
bool isValid(::data_handler::DataHandlerBase datahandler)
```

`inherited`

checks the settings

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler we refer to |

**Returns**

true iff the datahandler may be accessed

### isValid() \[2/2]

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

`override`

destructor

returns true if the [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) is valid

### load()

```cpp theme={null}
static ScalarMOP2 load(string path)
```

`static`

Loads the [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) from a file.

**Parameters**

| Name | Description |
| - | - |
| path | The path to read the file from |

### modelDescription()

```cpp theme={null}
string modelDescription(
    ::data_handler::DataHandlerBase datahandler,
    std::size_t output
)
```

`inherited`

Return the description of the model computing the output for the SclarMOP in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |
| output | The output under consideration |

**Returns**

A string containing the description of the model

### modelName()

```cpp theme={null}
string modelName(
    ::data_handler::DataHandlerBase datahandler,
    uint64_t output
)
```

`inherited`

Return the name of the model computing the output for the SclarMOP in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |
| output | The output under consideration |

**Returns**

A string containing the name of the model

### numInputs()

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

`override`

**Returns**

the number of input variables

### numOutputs()

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

`override`

**Returns**

the number of output variables

### numSamples()

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

`override`

**Returns**

number of samples used to establish [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md)

### operator=()

```cpp theme={null}
ScalarMOP2 operator=(ScalarMOP2 other)
```

overrides the default assignment operator

**Parameters**

| Name | Description |
| - | - |
| other | the source object |

**Returns**

a reference to this object

### operator==()

```cpp theme={null}
bool operator==(ScalarMOP2 other)
```

**Parameters**

| Name | Description |
| - | - |
| other | the other object to be compared with |

**Returns**

true if both objects contain the same content

### predictionError() \[1/2]

```cpp theme={null}
Matrix predictionError(::data_handler::DataHandlerBase datahandler)
```

`inherited`

Estimate the prediction error for [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler containing the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |

**Returns**

The prediction error

### predictionError() \[2/2]

```cpp theme={null}
number predictionError(
    ::data_handler::DataHandlerBase datahandler,
    uint64_t output
)
```

`inherited`

Estimate the prediction error for [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the datahandler on the given values for the given output.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler containing the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |
| output | The selected output |

**Returns**

Values approximated by the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md)

### qualityMeasureTotal() \[1/2]

```cpp theme={null}
Matrix qualityMeasureTotal(
    ::data_handler::DataHandlerBase datahandler,
    ::quality_measure::QualityMeasureBase quality_measure
)
```

`inherited`

Return the total quality measure w\.r.t. the expected responses from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the given datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |
| quality\_measure | The quality measure |

**Returns**

The total quality measure of all outputs w\.r.t. the expected responses

### qualityMeasureTotal() \[2/2]

```cpp theme={null}
number qualityMeasureTotal(
    ::data_handler::DataHandlerBase datahandler,
    ::quality_measure::QualityMeasureBase quality_measure,
    uint64_t output
)
```

`inherited`

Return the total quality measure w\.r.t. the expected responses for the given output from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) in the given datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler |
| quality\_measure | The quality measure |
| output | The output to compute for |

**Returns**

The total quality measure of all outputs w\.r.t. the expected responses

### sampleStatus() \[1/2]

```cpp theme={null}
Matrix sampleStatus(::data_handler::DataHandlerBase datahandler)
```

`inherited`

Return the the samples active/inactive for all models.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The database to take the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) from |

**Returns**

A matrix of bools specifying for each sample/model if it is active/inactive

### sampleStatus() \[2/2]

```cpp theme={null}
Matrix sampleStatus(
    ::data_handler::DataHandlerBase datahandler,
    uint64_t model
)
```

`inherited`

Return the the samples id active for the selected output from the given list of sample\_ids.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The database to take the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) from |
| model | The selected model |

**Returns**

A vector of bools specifying for each samples if it is active/inactive for the model

### save()

```cpp theme={null}
save(
    string path,
    bool replace_files = false
)
```

Saves the [ScalarMOP2](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scalar_m_o_p2.md) to a file.

**Parameters**

| Name | Description |
| - | - |
| path | The path to write the file to |
| replace\_files | if true, then an already existin gfile will be replaced |

### writeOMDB()

```cpp theme={null}
writeOMDB(
    string path,
    bool replace_files = false
)
```

Writes an optiSLang monitoring database file.

**Parameters**

| Name | Description |
| - | - |
| path | The path to write the file to |
| replace\_files | if true, then an already existin gfile will be replaced |
