src.pydasa.core.basic ===================== .. py:module:: src.pydasa.core.basic .. autoapi-nested-parse:: Module basic.py =========================================== This module provides base classes with common validation logic used across different classes to minimize code duplication in **PyDASA**. **IMPORTANT** - Based on the theory from H. Görtler, *Dimensionalanalyse: Eine Theoririe der physikalischen Dimensionen mit Anwendungen* Classes ------- .. autoapisummary:: src.pydasa.core.basic.SymBasis src.pydasa.core.basic.IdxBasis src.pydasa.core.basic.Foundation Module Contents --------------- .. py:class:: SymBasis Bases: :py:obj:`abc.ABC` Abstract Class to manage the entity's symbolic, sorting, and dimensional domain/framework functionalities in **PyDASA**. Inherits from: - **ABC**: Python Abstract Base Class to indicate that this class is not meant to be instantiated directly. .. py:attribute:: _sym :type: str :value: '' Symbol representation (LaTeX or alphanumeric). .. py:attribute:: _fwk :type: str :value: 'PHYSICAL' Frameworks context (PHYSICAL, COMPUTATION, SOFTWARE, CUSTOM). .. py:attribute:: _alias :type: str :value: '' `\rho_{1}` -> `rho_1`. :type: Python-compatible alias for symbol, used in executable code. e.g. .. py:property:: sym :type: str Get the entity's symbol. :returns: Symbol value. :rtype: str .. py:property:: fwk :type: str Get the entity's framework. :returns: Frameworks value. :rtype: str .. py:property:: alias :type: Optional[str] Get the Python variable synonym. :returns: Python variable name. e.g.: `\rho_{1}` -> `rho_1`. :rtype: Optional[str] .. py:method:: clear() Reset symbol, alias, and framework attributes to default values. .. py:class:: IdxBasis Bases: :py:obj:`SymBasis` Basic class to manage index/precedence functionalities in **PyDASA** entities. Inherits from: - **SymBasis**: Inherits symbol and framework validation. .. py:attribute:: _idx :type: int :value: -1 Unique identifier/index for ordering in dimensional matrix. .. py:property:: idx :type: int Get the index/precedence value. :returns: Index value. :rtype: int .. py:method:: clear() Reset index and inherited symbol attributes to default values. .. py:class:: Foundation Bases: :py:obj:`IdxBasis` Basic class to manage common attributes and validation logic for dimensional analysis entities in **PyDASA**. Provides common validation logic and attributes shared by dimensional framework/domain, Variable, and Coeffcient classes. Inherits from: - **IdxBasis**: Inherits index, symbol, and framework validation. .. py:attribute:: _name :type: str :value: '' User-friendly name of the entity. .. py:attribute:: description :type: str :value: '' Brief summary or description of the entity. .. py:property:: name :type: str Get the entity's name. :returns: Name value. :rtype: str .. py:method:: clear() Reset name, description, and inherited attributes to default values.