mode_util
mode_util
¶
Gilbert modes related tools.
Dimensions
dataclass
¶
Container for system dimensions.
Source code in cssfinder/algorithm/mode_util.py
ModeUtil
¶
Bases: ABC
Base class for implementing mode specific utilities eg.
shape deduction.
Source code in cssfinder/algorithm/mode_util.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
new
staticmethod
¶
Create new ModeUtil subclass instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mode |
AlgoMode
|
Util set selector. |
required |
Returns:
Type | Description |
---|---|
ModeUtil
|
Instance of subclass of ModeUtil. |
Raises:
Type | Description |
---|---|
NotImplementedError
|
For unsupported AlgoModes and incorrect input. |
Source code in cssfinder/algorithm/mode_util.py
get_dimensions
¶
Detect both system depth and system quantity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
int
|
State matrix to detect dimensions for. |
required |
Returns:
Type | Description |
---|---|
Dimensions
|
System dimensions within dedicated container. |
Raises:
Type | Description |
---|---|
ValueError
|
When depth and quantity can't be determined. |
Source code in cssfinder/algorithm/mode_util.py
detect_depth_and_quantity
abstractmethod
¶
Detect both system depth and system quantity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
total |
int
|
Dimension along one of axes. Matrix is expected to be square. |
required |
Returns:
Type | Description |
---|---|
Dimensions
|
System dimensions within dedicated container. |
Raises:
Type | Description |
---|---|
ValueError
|
When depth and quantity can't be determined. |
Source code in cssfinder/algorithm/mode_util.py
FSnQdUtil
¶
Bases: ModeUtil
FSnQd specific implementation of utilities eg.
shape deduction.
Source code in cssfinder/algorithm/mode_util.py
detect_depth_and_quantity
¶
Detect both system depth and system quantity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
total |
int
|
Dimension along one of axes. Matrix is expected to be square. |
required |
Returns:
Type | Description |
---|---|
Dimensions
|
System dimensions within dedicated container. |
Raises:
Type | Description |
---|---|
ValueError
|
When depth and quantity can't be determined. |
Source code in cssfinder/algorithm/mode_util.py
SBiPaUtil
¶
Bases: ModeUtil
SBiPa specific implementation of utilities eg.
shape deduction.
Source code in cssfinder/algorithm/mode_util.py
detect_depth_and_quantity
¶
Detect both system depth and system quantity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
total |
int
|
Dimension along one of axes. Matrix is expected to be square. |
required |
Returns:
Type | Description |
---|---|
Dimensions
|
System dimensions within dedicated container. |
Raises:
Type | Description |
---|---|
ValueError
|
When depth and quantity can't be determined. |
Source code in cssfinder/algorithm/mode_util.py
UndefinedSystemSizeError
¶
Bases: ValueError
Raised when it is not possible to determine system dimensions.
Source code in cssfinder/algorithm/mode_util.py
G3PaE3qDUtil
¶
Bases: ModeUtil
G3PaE3q specific implementation of utilities eg.
shape deduction.
Source code in cssfinder/algorithm/mode_util.py
detect_depth_and_quantity
¶
Detect both system depth and system quantity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
total |
int
|
Dimension along one of axes. Matrix is expected to be square. |
required |
Returns:
Type | Description |
---|---|
Dimensions
|
System dimensions within dedicated container. |
Raises:
Type | Description |
---|---|
ValueError
|
When depth and quantity can't be determined. |