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

Refactor the xspline class #18

Merged
merged 29 commits into from
Sep 29, 2022
Merged

Refactor the xspline class #18

merged 29 commits into from
Sep 29, 2022

Conversation

zhengp0
Copy link
Member

@zhengp0 zhengp0 commented Sep 29, 2022

  • Add XFunction class to abstract function call and append action
  • Add BundleXFunction class for bundling value, derivative and integral function into a XFunction
  • Add BasisXFunction class for function that consists of a set of basis
  • Add Bspl, Poly and Indi class as subclasses for BundleXFunction, they represet, bspline, polynomial and indicator function
  • Add XSpline function as subclass for BasisXFunction that combines Bspl and Poly based on different extrapolation options.

@zhengp0 zhengp0 changed the base branch from main to develop September 29, 2022 00:50
@zhengp0 zhengp0 changed the base branch from develop to main September 29, 2022 00:52
@zhengp0 zhengp0 changed the base branch from main to develop September 29, 2022 00:54
@zhengp0 zhengp0 merged commit c99fd76 into develop Sep 29, 2022
@zhengp0 zhengp0 deleted the feature/xfunction branch September 29, 2022 00:55
zhengp0 added a commit that referenced this pull request Aug 5, 2023
* Refactor the xspline class (#18)

* add new xfunctions

* add xfunction module and add cache decorator to bspl

* remove the explicit cache

* remove redundant integer type

* add add function for xfunction and switch to tuple method for the cache

* add test for poly module

* add test for indi module

* add test for indi module

* remove old scripts

* update install file

* update ci to python 3.10

* update typing

* add test for bspl

* separate the function evaluation and argument validation

* fix typo and import

* format XFunction as a function wrapper

* add constraint on integrals and recode add function

* add test for the XFunction.add

* change BundleXFunction to implement class method fun

* separate out the argument checking

* Add basis xfunction and convenient functions from bspl and poly

* add xspline class

* separate out cache clear function and auto clear in xspline

* change num_basis_funs from property to len fun

* add convenient import

* add tests for check args and function call of xfunction

* test basis xfunction

* add test for xspline

* add docstring for Bspl, Poly, Indi class

* raise error when xfunction evaluate val and der and x.ndim == 2

* fix the type hint typo

* update the installation process

* Add docstring (#19)

* add docstring to xfunction

* remove dependency on Optional

* add docstring to bspline function module

* add docstring to indicator function

* add docstring to poly class

* add docstring for the main xspline class

* remove the member function approach

* Add documentation and gh-pages (#20)

* change coefs to coef

* add installation and example to readme file

* add more examples

* add final example

* update badges

* add code of conduct

* add website documentation

* remove the images in the parent folder

* add gh actions to delopy docs
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