CustomModelTester Class Reference
Last update: 16.07.2025This class can be used in python context to check if all Interface functions of a custom model are implemented correctly. More...
Public Member Functions | |
| virtual string | __str__ () |
| Function to allow printing instances of this class in python. More... | |
| CustomModelTester () | |
| Constructor. | |
| virtual | deserializeModel (string state) |
| Function to deserializatize a model from its former state-string. More... | |
| virtual string | serializeModel () |
| Function to call the python models serialization function and return its state as a string. More... | |
| virtual bool | test (Matrix points) |
| Tests the model by invoking all of its API functions. Does not perform correctness checks. Just checks if the Interface is callable. More... | |
| virtual bool | testSerialization () |
| Tests if the models serialization functions are working. More... | |
Public Attributes | |
| apply SWIGTYPE * | DISOWN |
| Destructor. More... | |
Detailed Description
This class can be used in python context to check if all Interface functions of a custom model are implemented correctly.
Member Function Documentation
◆ __str__()
|
virtual |
Function to allow printing instances of this class in python.
- Returns
- A string with information on the instance
◆ deserializeModel()
|
virtual |
Function to deserializatize a model from its former state-string.
- Parameters
-
state Encoded state of the custom model
◆ serializeModel()
|
virtual |
Function to call the python models serialization function and return its state as a string.
- Returns
- Encoded state of the custom model
◆ test()
|
virtual |
Tests the model by invoking all of its API functions. Does not perform correctness checks. Just checks if the Interface is callable.
- Parameters
-
points The points to call the models function with
- Returns
- True iff all API functions are present.
◆ testSerialization()
|
virtual |
Tests if the models serialization functions are working.
- Returns
- True iff both serialization and deserialization is working
Member Data Documentation
◆ DISOWN
| apply SWIGTYPE * DISOWN |
Destructor.
Internal function for the python classes to interact with the underlying cpp model Should not be called by a user, needs to be public in SWIG context.
Register a custom model with the CustomModelTester Needs to be called from Python. Takes ownership of the pointer.
- Parameters
-
model The model to use with the model tester cpp_model The C++ wrapper model that can is used to manage the python model