neuralqx.utils.misc.modifiers module¶
- get_modifier_value(mod, max_terms)¶
Format an integer modifier as a zero-padded string with a consistent width.
The returned width is determined by the number of digits of
max_terms. This ensures that all modifier strings produced with the samemax_termshave the same length and can be concatenated safely into a single identifier.Example
If
max_terms == 120(width 3), thenmod == 7becomes"007"andmod == 42becomes"042".
- get_modifier_string(*args, max_terms)¶
Build a concatenated modifier string from multiple integer modifiers.
Each modifier in
argsis formatted usingget_modifier_value()so that all components have the same fixed width determined bymax_terms(i.e.len(str(max_terms))). The final string is the concatenation of these fixed-width components.