Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

CoP Struct Reference

Last update: 16.07.2025

Reference implementation for a quality metric for MOP models. More...

Public Member Functions

 CoP ()=default
 Constructor.
 
 CoP (CoP)=default
 Copy-Constructor.
 
virtual number error (ResidualsBase residuals, uint64_t output=0) override
 Computes the prediction error of the given residuals according to the input and its selected output. More...
 
virtual bool expectsCrossValidation () override
 Return true if the quality measure expects to handle cross validated outputs.
 
virtual loadJson (JsonValue root) override
 Function to load the Serializables data from a JsonValue. More...
 
virtual number measure (ResidualsBase residuals, uint64_t output=0) override
 Computes the quality measure of the given residuals according to the input and its selected output. More...
 
CoP operator= (CoP)=default
 Copy-Assignment.
 
virtual JsonValue saveJson () override
 Function to save the Serializables data as a JsonValue. More...
 
virtual std::ostream write (std::ostream) override
 Write the qualityMeasures name out.
 

Detailed Description

Reference implementation for a quality metric for MOP models.

Member Function Documentation

◆ error()

virtual number error ( ResidualsBase  residuals,
uint64_t  output = 0 
)
overridevirtual

Computes the prediction error of the given residuals according to the input and its selected output.

Parameters
residualsThe residuals to calculate the quality measure for
outputthe selected output.
Returns
A value that measures the deviation of the residualss approximation against the selected output.

Implements QualityMeasureBase.

◆ loadJson()

virtual loadJson ( JsonValue  root)
overridevirtual

Function to load the Serializables data from a JsonValue.

Parameters
rootThe data of the serializable as JsonValue

◆ measure()

virtual number measure ( ResidualsBase  residuals,
uint64_t  output = 0 
)
overridevirtual

Computes the quality measure of the given residuals according to the input and its selected output.

Parameters
residualsThe residuals to calculate the quality measure for
outputthe selected output.
Returns
A value that measures the deviation of the residualss approximation against the selected output.

Implements QualityMeasureBase.

◆ saveJson()

virtual JsonValue saveJson ( )
overridevirtual

Function to save the Serializables data as a JsonValue.

Returns
The data of the serializable as JsonValue

Connect with Ansys