swarmauri.core.vector_stores.IGradient module

class swarmauri.core.vector_stores.IGradient.IGradient[source]

Bases: ABC

Interface for calculating the gradient of a scalar field.

abstract calculate_gradient(scalar_field, point)[source]

Calculate the gradient of a scalar field at a specific point.

Return type:

List[float]

Parameters: - scalar_field (Callable[[List[float]], float]): The scalar field represented as a function

that takes a point and returns a scalar value.

  • point (List[float]): The point at which the gradient is to be calculated.

Returns: - List[float]: The gradient vector at the specified point.