-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschematodes.pyi
More file actions
39 lines (33 loc) · 1.46 KB
/
schematodes.pyi
File metadata and controls
39 lines (33 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class TwoSymbolSchema:
"""TwoSymbolSchema
Fields
------
redescribed_schemata: list[list[int]]
The list of redescribed one-symbol schema, each represented as a list of 0s, 1s, and 2s.
bubble_indices: list[list[int]]
The list of bubble group indices. Each entry is a list of indices that can be arbitrarily permuted without affecting the redescribed schema set.
signature: list[tuple[int,int,int]]
The number of 0s, 1s, and 2s in each redescribed schemata.
"""
def __init__(self) -> None:
self.redescribed_schemata: list[list[int]] = ...
self.bubble_indices: list[list[int]] = ...
self.signature: list[tuple[int, int, int]] = ...
def schemer(
one_symbol_schemata: list[list[int]],
max_symbol: int | None = None,
) -> list[TwoSymbolSchema]:
"""Redescribe a list of one-symbol schema as a list of two-symbol schema.
Parameters
----------
one_symbol_schemata: list[list[int]]
A list of one-symbol schemata, where each element is a list of integers between 0 and 2 (inclusive).
A 1 or 0 represents an "ON" or "OFF" state, respectively, while a 2 represents a wildcard (#).
max_symbol: int | None
The largest symbol that should be considered possible when calculating signature. If None, the largest observed symbol is used.
Returns
-------
list[TwoSymbolSchema]
A list of TwoSymbolSchema objects representing the compressed schema.
"""
...