[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Polynomials in arbitrary basis

From: Vladislav Malyshkin
Subject: Re: Polynomials in arbitrary basis
Date: Sun, 17 Jun 2018 16:06:03 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

The code is java written, I do not have octave package. Only java.
Earlier version (bundled with other code) is available at https://yadi.sk/d/AtPJ4a8copmZJ?locale=en file  AMuseOfCashFlowAndLiquidityDeficit.20_Sept_2017.zip
latest code version (minor API changes & code structure) is attached to this e-mail: polynomial_code.zip (this is preferred version to use, I did not release it yet, but changes from Sept 20 1017 version are really minor (few functions renamed))
There are basically two API of interest to you:
  • Generalized polynomial basis functionality  com/polytechnik/utils/BasisPolynomials.java
  • Gauss--type quadratures calculation in generalized basis com/polytechnik/utils/OrthogonalPolynomialsABasis.java
These API are implemented for Chebyshev, Legendre, HermiteE, Laguerre, Shifted Legendre, Monomials  bases.
Polynomials operations are implemented in com/polytechnik/utils/{Chebyshev,Legendre,HermiteE,Laguerre,LegendreShifted,Monomials}.java
with built-in selftest (e.g. run java
com/polytechnik/utils/Chebyshev to selftest the class).

There are not that much code there, it may be easier to re-implement that code natively  in octave, rather than do any java-wrapper, especially because my quadraures (not polynomial) code call few lapack subs converted from fortran, it is probably better for octave to call Lapack subs directly). All my code is under GPL.

Polynomials manipulation and Gauss--type quadratures calculation in generalized basis is described in
https://arxiv.org/pdf/1510.05510 , Appendix A & B, page 30.


P.S. To test the code
javac -g com/polytechnik/*/*java
# then one can run selftest for, say, Legendre Basis & Quadratures calculation in Legendre basis.
java  com/polytechnik/utils/Legendre
java  com/polytechnik/utils/OrthogonalPolynomialsLegendreBasis
# to run all selftests
java  com/polytechnik/utils/UnitTests

P.P.S. http://www.chebfun.org/docs/guide/chebfun_guide.pdf by Lloyd N. Trefethen is good, but has different goals.

On 06/17/2018 02:49 PM, Juan Pablo Carbajal wrote:

Sounds interesting. Could you share the repository where you host your code?
Also, you can create a package, compress it and provide an url, this
way anybody can install it from within octave

pkg install http://your.url

needs Octave >= 4.4

On Sat, Jun 16, 2018 at 9:39 PM, Vladislav Malyshkin <address@hidden> wrote:
Octave currently has polynomials manipulation functionality
only in monomials basis: sum ckxk
In practice it is often very convenient to have polynomial represented in
other polynomials basis: sum ckQk(x)
where the basis  Qk(x) is orthogonal polynomials of some kind.
There is my implementation of polynomials manipulation functionality (and
Gauss-type quadratures calculation) in the basis of Chebyshev, Legendre,
Laguerre, Hermite bases.
The code is available under GPL and is java-written (however it will not be
much a problem to rewrite it in C/C++).
You can read about code at https://arxiv.org/pdf/1510.05510 see Appendix A &
Let me know if you have any interest.
P.S. From the other alternative basis software I know only matlab-written
http://www.chebfun.org/ by Alex Townsend, but his project has different

Attachment: polynomial_code.zip
Description: Zip archive

reply via email to

[Prev in Thread] Current Thread [Next in Thread]