Let us walk on the 3-isogeny graph
|
Data Structures | |
class | E |
class | Edge |
Functions | |
List[int] | ratio_resolve (int total, Sequence[Edge] edges) |
List[int] | ratio_reduce (int total, List[int] ratios, List[int] maximums, List[int] values) |
List[int] | ratio_distribute (int total, List[int] ratios, Optional[List[int]] minimums=None) |
Variables | |
resolved | |
List[int] ratio_distribute | ( | int | total, |
List[int] | ratios, | ||
Optional[List[int]] | minimums = None |
||
) |
Distribute an integer total in to parts based on ratios. Args: total (int): The total to divide. ratios (List[int]): A list of integer ratios. minimums (List[int]): List of minimum values for each slot. Returns: List[int]: A list of integers guaranteed to sum to total.
Definition at line 113 of file _ratio.py.
References i.
List[int] ratio_reduce | ( | int | total, |
List[int] | ratios, | ||
List[int] | maximums, | ||
List[int] | values | ||
) |
Divide an integer total in to parts based on ratios. Args: total (int): The total to divide. ratios (List[int]): A list of integer ratios. maximums (List[int]): List of maximums values for each slot. values (List[int]): List of values Returns: List[int]: A list of integers guaranteed to sum to total.
Definition at line 81 of file _ratio.py.
References i.
List[int] ratio_resolve | ( | int | total, |
Sequence[Edge] | edges | ||
) |
Divide total space to satisfy size, ratio, and minimum_size, constraints. The returned list of integers should add up to total in most cases, unless it is impossible to satisfy all the constraints. For instance, if there are two edges with a minimum size of 20 each and `total` is 30 then the returned list will be greater than total. In practice, this would mean that a Layout object would clip the rows that would overflow the screen height. Args: total (int): Total number of characters. edges (List[Edge]): Edges within total space. Returns: List[int]: Number of characters for each edge.
Definition at line 20 of file _ratio.py.
References i.