Interface VectorField<V>

All Superinterfaces:
Function<V, Vector<Real>>, Function<V, Vector<Real>>, Relation<V, Vector<Real>>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface VectorField<V> extends Function<V, Vector<Real>>
Represents a vector field: F: ℝⁿ → ℝⁿ

A vector field assigns a vector to each point in space.

Examples in physics: - Velocity field: v(x,y,z) in fluid dynamics - Electric field: E(x,y,z) - Magnetic field: B(x,y,z) - Gravitational field: g(x,y,z) - Force field: F(x,y,z)

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • evaluate

      Vector<Real> evaluate(V point)
      Evaluates the vector field at a given point.
      Specified by:
      evaluate in interface Function<V, Vector<Real>>
      Parameters:
      point - the point at which to evaluate
      Returns:
      the vector value at that point
    • dimension

      default int dimension()
      Returns the dimension of the domain and codomain.

      Default implementation returns -1 (unknown).

      Returns:
      the dimension, or -1 if unknown
    • of

      static <V> VectorField<V> of(Function<V, Vector<Real>> evaluator)
      Creates a vector field from a lambda expression.
      Type Parameters:
      V - the point type
      Parameters:
      evaluator - the evaluation function
      Returns:
      the vector field
    • of

      static <V> VectorField<V> of(Function<V, Vector<Real>> evaluator, int dimension)
      Creates a vector field with known dimension.
      Type Parameters:
      V - the point type
      Parameters:
      evaluator - the evaluation function
      dimension - the dimension
      Returns:
      the vector field