agatha.ml.abstract_generator.misc_util module¶
-
class
agatha.ml.abstract_generator.misc_util.HashedIndex(max_index)¶ Bases:
objectThis class acts as a dict that maps items to a fixed range of values. Items must be convertible to strings. Value -> Idx idx -> Set of values
-
add(elem)¶ - Return type
None
-
get_elements(idx)¶ - Return type
Set[Any]
-
get_index(elem)¶ - Return type
int
-
has_element(elem)¶ - Return type
bool
-
has_index(idx)¶ - Return type
bool
-
-
class
agatha.ml.abstract_generator.misc_util.OrderedIndex¶ Bases:
objectSame exact interface as hashed index, without the hashing
-
add(elem)¶ - Return type
None
-
get_elements(idx)¶ - Return type
Set[Any]
-
get_index(elem)¶ - Return type
int
-
has_element(elem)¶ - Return type
bool
-
has_index(idx)¶ - Return type
bool
-
-
agatha.ml.abstract_generator.misc_util.items_to_hashed_index(collection, max_index)¶ - Return type
-
agatha.ml.abstract_generator.misc_util.items_to_ordered_index(collection)¶ - Return type