Skip to content

Cleanup and api doc part 1#117

Merged
marcelluethi merged 4 commits into
dimwit-dev:mainfrom
marcelluethi:cleanup-and-api-doc-part-1
Jun 22, 2026
Merged

Cleanup and api doc part 1#117
marcelluethi merged 4 commits into
dimwit-dev:mainfrom
marcelluethi:cleanup-and-api-doc-part-1

Conversation

@marcelluethi

@marcelluethi marcelluethi commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

This is the first part of an attempt to add api-documentation and clean up the tensor operations.
The most important technical change is that the Aux Pattern was replaced by a more direct approach, where the evidence object has an explicit type member, thereby avoiding auxiliary type parameters (see sum or outerProduct)

Once approved, documentation and cleanup will go on with the remaining tensor operations.

AxisRemovers and other related type level witnesses used the Aux Pattern, introducing 2 auxiliary type variables in the signature. We introduce instead an explicit type member, which we can directly refer to in the signature, eliminating the additional type parameters.
@marcelluethi marcelluethi requested a review from benikm91 June 21, 2026 13:04
type NewShape = O

// Replace single axis with multiple axes
/** Replace Axis in given Tuple with the Axis in the AxisReplacements tuple */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/** Replace Axis in given Tuple with the Axes in the AxisReplacements tuple */

type RemainingAxes <: Tuple

object AxesRemover:
type Aux[T <: Tuple, Axes <: Tuple, R <: Tuple] = AxesRemover[T, Axes] { type RemainingAxes = R }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding Aux Pattern?

@benikm91 benikm91 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its to much detailed changes and I am not an expert on type level. I approve as it is probably an improvement and the tests pass.

@marcelluethi marcelluethi merged commit 2428331 into dimwit-dev:main Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants