Source code for swarmauri.core.vector_stores.IVectorLinearCombination

from abc import ABC, abstractmethod
from typing import List, Any

[docs] class ILinearCombination(ABC): """ Interface for creating a vector as a linear combination of a set of vectors. """
[docs] @abstractmethod def linear_combination(self, coefficients: List[float], vectors: List[Any]) -> Any: """ Computes the linear combination of the given vectors with the specified coefficients. Parameters: - coefficients (List[float]): A list of coefficients for the linear combination. - vectors (List[Any]): A list of vectors to be combined. Returns: - Any: The resulting vector from the linear combination. """ pass