ParameterBase

class minkit.ParameterBase[source]

Bases: object

Abstract class for parameter objects.

Attributes Summary

dependent

value

Value of the parameter.

Methods Summary

copy()

Create a copy of this instance.

from_json_object(obj)

Build the parameter from a JSON object (a dictionary).

restoring_state()

Enter a context where the attributes of the parameter will be restored on exit.

to_json_object()

Represent this class as a JSON-like object.

Attributes Documentation

dependent = False
value

Value of the parameter.

Type

float

Methods Documentation

copy()[source]

Create a copy of this instance.

Warning

Avoid calling this method directly for sets of parameters and use the Registry.copy() method instead, so the possible dependencies among parameters are correctly solved.

classmethod from_json_object(obj)[source]

Build the parameter from a JSON object (a dictionary). This is meant to be used together with the json module.

Parameters

obj (dict) – object to use to construct the class.

Returns

parameter created from the JSON object.

Return type

Parameter

restoring_state()[source]

Enter a context where the attributes of the parameter will be restored on exit.

to_json_object()[source]

Represent this class as a JSON-like object.

Returns

this class as a JSON-like object.

Return type

dict