qsrlib_qsrs.qsr_abstractclass module¶
-
class
qsrlib_qsrs.qsr_abstractclass.
QSR_Abstractclass
[source]¶ Bases:
object
Root abstract class of the QSR implementators.
- Abstract properties
- _unique_id (str): Unique identifier of a QSR.
- _all_possible_relations (tuple): All possible relations of a QSR.
- _dtype (str): Kind of data the QSR operates with, see self._dtype_map for possible values.
- Members
_dtype_map (dict): Mapping of _dtype to methods. It contains:
- “points”: self._return_points
- “bounding_boxes”: self._return_bounding_boxes_2d
- “bounding_boxes_2d”: self._return_bounding_boxes_2d
-
all_possible_relations
¶ Getter for all the possible relations of a QSR.
Returns: self._all_possible_relations Return type: tuple
-
get_qsrs
(**req_params)[source]¶ Compute the QSRs.
This method is called from QSRlib so no need to call it directly from anywhere else.
Parameters: req_params (dict) – Request parameters. Returns: Computed world qsr trace. Return type: World_QSR_Trace
-
make_world_qsr_trace
(world_trace, timestamps, qsr_params, req_params, **kwargs)[source]¶ The main function that generates the world QSR trace.
- QSR classes inheriting from the general purpose meta-abstract classes (e.g.
QSR_Monadic_Abstractclass
,QSR_Dyadic_Abstractclass
, etc.) need to provide this function. - When inheriting from one of the special case meta-abstract classes (e.g.
QSR_Monadic_2t_Abstractclass
,QSR_Dyadic_1t_Abstractclass
, etc.) then usually there is no need to do so; check with the documentation of these special cases to see if they already implement one.
Parameters: - world_trace (
World_Trace
) – Input data. - timestamps (list) – List of sorted timestamps of world_trace.
- qsr_params (dict) – QSR specific parameters passed in dynamic_args.
- dynamic_args (dict) – Dynamic arguments passed with the request.
- kwargs – kwargs arguments.
Returns: Computed world QSR trace.
Return type: - QSR classes inheriting from the general purpose meta-abstract classes (e.g.
-
unique_id
¶ Getter for the unique identifier of a QSR.
Returns: self._unique_id Return type: str