from abc import ABC, abstractmethod
from typing import List
[docs]
class IVectorArithmetic(ABC):
[docs]
@abstractmethod
def add(self, vector1: List[float], vector2: List[float]) -> List[float]:
"""
Vector addition of 'vector1' and 'vector2'.
"""
pass
[docs]
@abstractmethod
def subtract(self, vector1: List[float], vector2: List[float]) -> List[float]:
"""
Vector subtraction of 'vector1' - 'vector2'.
"""
pass
[docs]
@abstractmethod
def multiply(self, vector: List[float], scalar: float) -> List[float]:
"""
Scalar multiplication of 'vector' by 'scalar'.
"""
pass
[docs]
@abstractmethod
def divide(self, vector: List[float], scalar: float) -> List[float]:
"""
Scalar division of 'vector' by 'scalar'.
"""
pass