swarmauri.core.vector_stores.IVectorNorm module
- class swarmauri.core.vector_stores.IVectorNorm.IVectorNorm[source]
Bases:
ABC
Interface for calculating vector norms. Supports L1 norm, L2 norm, and Max norm calculations.
- abstract l1_norm(vector)[source]
Calculate the L1 norm (Manhattan norm) of a vector.
Parameters: - vector (List[Union[int, float]]): The vector for which to calculate the L1 norm.
Returns: - float: The L1 norm of the vector.
- Return type:
float