Linear Algebra Base
The base module provides the main facade for linear stability analysis.
Main Classes
- class hiten.algorithms.linalg.base.StabilityPipeline[source]
Bases:
_HitenBaseFacade
,Generic
[DomainT
,InterfaceT
,ConfigT
,ResultT
]Facade exposing linear stability results on demand.
- Parameters:
config (
ConfigT
) – Configuration object.interface (
InterfaceT
) – Interface object.engine (
_LinearStabilityEngine
) – Engine object.backend (_LinalgBackend)
- classmethod with_default_engine(*, config, interface=None, backend=None)[source]
Create a facade instance with a default engine (factory).
- Parameters:
config (
ConfigT
) – Configuration object.interface (
InterfaceT
) – Interface object.backend (
_LinalgBackend
, optional) – Backend object. If None, uses the default _LinalgBackend.
- Returns:
A stability pipeline instance with a default engine injected.
- Return type:
- compute(domain_obj, override=False, *, system_type=None, problem_type=None, delta=None, tol=None)[source]
Compose a problem from domain_obj and run the engine.
- Parameters:
domain_obj (
DomainT
) – Domain object.override (bool) – Whether to override configuration with provided kwargs.
system_type (
_SystemType
) – System type.problem_type (
_ProblemType
) – Problem type.delta (float) – Delta.
tol (float) – Tolerance.
- Returns:
Eigen decomposition results.
- Return type:
- property is_stable: bool
Check if the system is stable.
- Returns:
True if the system is stable, False otherwise.
- Return type:
- property eigenvalues: Tuple[ndarray, ndarray, ndarray]
Get the eigenvalues.
- Returns:
Stable eigenvalues, unstable eigenvalues, and center eigenvalues.
- Return type:
Tuple[np.ndarray, np.ndarray, np.ndarray]
- property eigenvectors: Tuple[ndarray, ndarray, ndarray]
Get the eigenvectors.
- Returns:
Stable eigenvectors, unstable eigenvectors, and center eigenvectors.
- Return type:
Tuple[np.ndarray, np.ndarray, np.ndarray]
- get_real_eigenvectors(vectors, values)[source]
Get the real eigenvectors.
- Parameters:
vectors (np.ndarray) – Eigenvectors.
values (np.ndarray) – Eigenvalues.
- Returns:
Real eigenvalues and eigenvectors.
- Return type:
Tuple[np.ndarray, np.ndarray]
- Raises:
ValueError – If the eigenvalues are not real.