robokudo.utils.comparator_factories

Classes

FeatureComparatorFactory

A factory for creating feature comparators.

Module Contents

class robokudo.utils.comparator_factories.FeatureComparatorFactory

A factory for creating feature comparators.

annotator_comparators: typing_extensions.Dict[typing_extensions.Type[robokudo.types.core.Annotation], typing_extensions.Type[robokudo.utils.comparators.FeatureComparator]]

Mapping of annotation types to feature comparators.

type_comparators: typing_extensions.Dict[typing_extensions.Type[robokudo.types.core.Type], typing_extensions.Type[robokudo.utils.comparators.FeatureComparator]]

Mapping of robokudo types to feature comparators.

classmethod for_annotation(annotation: typing_extensions.Type[robokudo.types.core.Annotation], weight: float, **kwargs) typing_extensions.Optional[robokudo.utils.comparators.FeatureComparator]

Get a feature comparator for the given annotation type and assign it the given weight.

Parameters:
  • annotation – The annotation type to get a feature comparator for.

  • weight – The weight to assign the annotation type.

Returns:

A feature comparator instance for the given annotation type or None if the type is not supported.

classmethod for_type(rk_type: typing_extensions.Type[robokudo.types.core.Type], weight: float, **kwargs) typing_extensions.Optional[robokudo.utils.comparators.FeatureComparator]

Get a feature comparator for the given robokudo type and assign it the given weight.

Parameters:
  • rk_type – The robokudo type to get a feature comparator for.

  • weight – The weight to assign the annotation type.

Returns:

A feature comparator instance for the given annotation type or None if the type is not supported.