module cconfigs
Cell configuration functions
This module provides functions for finding/handling cell configurations.
When called directly as main, it outputs a list of the best and wost configs.
$ python -m mlcsim.cconfigs --help
usage: cconfigs.py [-h] [-b {1,2,3,4}] [-c {1,2,3,4,5,6,7,8,9}] [-o O]
options:
-h, --help show this help message and exit
-b {1,2,3,4} bits per cell
-c {1,2,3,4,5,6,7,8,9}
num of cells
-o O output to file
function findAllConfigs
findAllConfigs(bits_per_cell: int, num_cells: int) → List[List[List[int]]]
Calculates all possible cell configurations
Args:
bits_per_cell(int): Bits per cellnum_cells(int): Number of cells
Returns:
list: List of all possible cell configurations
function sortConfigs
sortConfigs(
b: int,
c: int,
error_map: List[List[float]]
) → List[Tuple[float, List[List[int]], float]]
Generates all cell configs and sorts them by their delta and error sum
Args:
b(int): Bits per cellc(int): Number of cellserror_map(dict): Error map dictionary
Returns:
list: All configs sorted by delta and error sum
function calcCellDelta
calcCellDelta(cell: List[int], bpc: int) → int
Calculates the sum of the step sizes for a cell
Args:
cell(list): List of bits in a cell (i.e. [0, 1, 2, 3])bpc(int): Bits per cell
Returns:
int: Sum of the step sizes between levels in the cell
function calcCellDeltaList
calcCellDeltaList(cell: List[int]) → List[int]
Calculates the list of step sizes for a cell
Args:
cell(list): List of bits in a cell (i.e. [0, 1, 2, 3])
Returns:
list: List of step sizes between levels in the cell
This file was automatically generated via lazydocs.