Skip to content

MathEx/LinAlgEx naming is non-idiomatic #325

Description

@devcrocod

The public interfaces MathEx and LinAlgEx use a Java-style Ex suffix, and their type-specific methods use single-letter suffixes that are not Kotlin-idiomatic:

  • MathEx: expF, expCF, expCD (and the same for log, sin, cos)
  • LinAlgEx: invF, invC, solveF, solveC, dotMMF, dotMMComplex, …

Convenience overloads on Math/LinAlg and MultiArray extensions (a.exp(), mk.math.exp(a)) already dispatch by element type, so end users rarely need to call expF/invC directly — but the interfaces remain public API that engine implementations (KEEngine, NativeEngine) depend on.

Suggested approach

Any of the following, or a combination:

  1. Rename MathEx/LinAlgEx to non-Ex names (e.g., ExtendedMath, ExtendedLinAlg).
  2. Replace F/CF/CD/C suffix methods with type-based overloads (the MultiArray<Float, D> parameter type is sufficient to disambiguate on the JVM).
  3. Or mark these as @InternalMultikApi / SPI-only and keep the user surface on Math/LinAlg.

Whatever we pick will be a breaking change, so it needs the standard deprecation path (WARNING → ERROR → HIDDEN).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiCommon apifeatureNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions