Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api refactoring #54

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

api refactoring #54

wants to merge 1 commit into from

Conversation

tpapp
Copy link
Owner

@tpapp tpapp commented Dec 9, 2024

The package has seen enough use (mostly for projects that I am involved in, as far as I know) to warrant some refactoring and API revamp. This is a list of ideas I want to work through, some may be split into a later PR, let's see. This may result in releasing version 1.0.

API

  • rename dimension to basis_dimension and domain to basis_domain, to avoid clashes with other packages. These terms are not generic anyway.
  • a unified function make_basis(family, grid_kind, dimspec) should replace univariate_basis and Chebyshev. family should admit Smolyak(Chebyshev). dimspec should allow integers as a shortcut, but maybe convert to types.
  • an API to tensor mixed setups, eg full tensored x smolyak

Internals

  • bases should have their dimension available statically (as part of the type), cf make dimension part of the type #32
  • calculations should unroll for at least low dimensions, especially Smolyak, benchmark this
  • the iterator form of linear_combination may not be ideal for all work, implement one that reuses common subexpressions, unrolling
  • optimize for linear_combination, most important
  • second most important: fast grid calculation
  • get a Tensor basis, cf this discussion. Implemented with the above features in mind. API could follow a "product" approach, eg overload ×

Open questions

  • a simple API for fitting "constant" and "linear" models within a family.

@tpapp tpapp changed the title api refactoring WIP: api refactoring Dec 10, 2024
@tpapp tpapp marked this pull request as draft December 10, 2024 10:03
@tpapp tpapp changed the title WIP: api refactoring api refactoring Dec 10, 2024
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.

1 participant