qrem.qtypes.datastructure_base
Data Structure Module
This module provides a base class for data structures with export and import capabilities. It includes methods for exporting and importing data structures to/from JSON and pickle formats.
Notes
@authors: Jan Tuziemski, Filip Maciejewski, Joanna Majsak, Oskar Słowik, Marcin Kotowski, Katarzyna Kowalczyk-Murynka, Paweł Przewłocki, Piotr Podziemski, Michał Oszmaniec @contact: michal.oszmaniec@cft.edu.pl
Module Contents
Classes
Base class for data structures with export and import capabilities. |
|
Example custom data structure derived from DataStructureBase. |
Attributes
- class qrem.qtypes.datastructure_base.DataStructureBase
Base class for data structures with export and import capabilities.
- None
- get_dict_format()
Returns this class as a JSON-like dictionary structure.
- load_from_dict(dictionary)
Loads class fields from a dictionary.
- to_json()
Returns this class as a JSON structure.
- export_json(json_export_path, overwrite=False)
Saves the class into a JSON file.
- import_json(json_import_path)
Imports class fields from a JSON file.
- get_pickle()
Returns this class as a pickle structure.
- export_pickle(pickle_export_path, overwrite=False)
Saves the class into a pickle file.
- import_pickle(pickle_import_path)
Imports class fields from a pickle file.
- get_dict_format()
returns this class as a json-like dictionary structure
- load_from_dict(dictionary)
- to_json()
returns this class as a json structure
- export_json(json_export_path, overwrite=False)
saves the class into json file
- import_json(json_import_path)
imports class’ fields from json file
- get_pickle()
returns this class as a pickle structure
- export_pickle(pickle_export_path, overwrite=False)
saves the class into pickle file
- import_pickle(pickle_import_path)
imports class’ fields from pickle file
- class qrem.qtypes.datastructure_base.MyTestStructure(data)
Bases:
DataStructureBaseExample custom data structure derived from DataStructureBase.
- data
The data stored in this structure.
- Type:
numpy.ndarray
- __init__(data)
Initializes a new instance of MyStructure.
- qrem.qtypes.datastructure_base._testcase1