

Octave currently has polynomials manipulation functionality
https://octave.org/doc/v4.0.3/PolynomialManipulations.html
only in monomials basis: sum c _{k}x ^{k
}In practice it is often very convenient to have polynomial
represented in other polynomials basis: sum c _{k}Q _{k}(x)
where the basis Q _{k}(x) is orthogonal polynomials of some
kind.
There is my implementation of polynomials manipulation functionality
(and Gausstype quadratures calculation) in the basis of Chebyshev,
Legendre, Laguerre, Hermite bases.
The code is available under GPL and is javawritten (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 & B.
Let me know if you have any interest.
Vladislav
P.S. From the other alternative basis software I know only
matlabwritten http://www.chebfun.org/
by Alex Townsend, but his project has different goals.


Hi,
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.urlneeds Octave >= 4.4
On Sat, Jun 16, 2018 at 9:39 PM, Vladislav Malyshkin < [hidden email]> wrote:
> Octave currently has polynomials manipulation functionality
> https://octave.org/doc/v4.0.3/PolynomialManipulations.html> 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
> Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
> Laguerre, Hermite bases.
> The code is available under GPL and is javawritten (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 &
> B.
> Let me know if you have any interest.
> Vladislav
> P.S. From the other alternative basis software I know only matlabwritten
> http://www.chebfun.org/ by Alex Townsend, but his project has different
> goals.
>


Juan,
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 email: 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
 Gausstype 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 builtin 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
reimplement that code natively in octave, rather than do any
javawrapper, 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 Gausstype quadratures calculation
in generalized basis is described in https://arxiv.org/pdf/1510.05510
, Appendix A & B, page 30.
Vladislav
P.S. To test the code
unzip polynomial_code.zip
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:
Hi,
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 [hidden email] wrote:
Octave currently has polynomials manipulation functionality
https://octave.org/doc/v4.0.3/PolynomialManipulations.html
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
Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
Laguerre, Hermite bases.
The code is available under GPL and is javawritten (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 &
B.
Let me know if you have any interest.
Vladislav
P.S. From the other alternative basis software I know only matlabwritten
http://www.chebfun.org/ by Alex Townsend, but his project has different
goals.


Hi,
There is little use of static zip sent around. Better set up a public
repository (gitlab, bitbucket, etc...) and share that.
I never linked java code to Octave, but since Java is a dependency of
Octave I can imagine it is very simple. Maybe you want to ask around
before investing time in re.writing your code.
I would say that the functionality is very important so if you do noot
have time to make a package of it, then we put it for the next summer
of code... or a bachelor student somewhere!
Regards,
On Sun, Jun 17, 2018 at 10:06 PM, Vladislav Malyshkin < [hidden email]> wrote:
> Juan,
> 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
> email: 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
> Gausstype 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 builtin 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 reimplement that
> code natively in octave, rather than do any javawrapper, 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 Gausstype quadratures calculation in
> generalized basis is described in https://arxiv.org/pdf/1510.05510 ,
> Appendix A & B, page 30.
>
> Vladislav
>
> P.S. To test the code
> unzip polynomial_code.zip
> 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:
>
> Hi,
>
> 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 < [hidden email]> wrote:
>
> Octave currently has polynomials manipulation functionality
> https://octave.org/doc/v4.0.3/PolynomialManipulations.html> 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
> Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
> Laguerre, Hermite bases.
> The code is available under GPL and is javawritten (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 &
> B.
> Let me know if you have any interest.
> Vladislav
> P.S. From the other alternative basis software I know only matlabwritten
> http://www.chebfun.org/ by Alex Townsend, but his project has different
> goals.
>
>


Juan,
it is now available from https://yadi.sk/d/AtPJ4a8copmZJ?locale=enthe file polynomial_code.June_17_2018.zip
Vladislav
On 06/17/2018 04:21 PM, Juan Pablo Carbajal wrote:
> Hi,
>
> There is little use of static zip sent around. Better set up a public
> repository (gitlab, bitbucket, etc...) and share that.
> I never linked java code to Octave, but since Java is a dependency of
> Octave I can imagine it is very simple. Maybe you want to ask around
> before investing time in re.writing your code.
>
> I would say that the functionality is very important so if you do noot
> have time to make a package of it, then we put it for the next summer
> of code... or a bachelor student somewhere!
>
> Regards,
>
>
> On Sun, Jun 17, 2018 at 10:06 PM, Vladislav Malyshkin < [hidden email]> wrote:
>> Juan,
>> 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
>> email: 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
>> Gausstype 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 builtin 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 reimplement that
>> code natively in octave, rather than do any javawrapper, 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 Gausstype quadratures calculation in
>> generalized basis is described in https://arxiv.org/pdf/1510.05510 ,
>> Appendix A & B, page 30.
>>
>> Vladislav
>>
>> P.S. To test the code
>> unzip polynomial_code.zip
>> 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:
>>
>> Hi,
>>
>> 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 < [hidden email]> wrote:
>>
>> Octave currently has polynomials manipulation functionality
>> https://octave.org/doc/v4.0.3/PolynomialManipulations.html>> 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
>> Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
>> Laguerre, Hermite bases.
>> The code is available under GPL and is javawritten (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 &
>> B.
>> Let me know if you have any interest.
>> Vladislav
>> P.S. From the other alternative basis software I know only matlabwritten
>> http://www.chebfun.org/ by Alex Townsend, but his project has different
>> goals.
>>
>>


Juan,
generalized basis polynomial code is now also available from two
places:
Vladislav
#sha1sum polynomial_code.June_17_2018.zip
code_polynomials_quadratures.zip
d8dacf0c0573f850c38978a9fc97d70298e1fa68
polynomial_code.June_17_2018.zip
d8dacf0c0573f850c38978a9fc97d70298e1fa68
code_polynomials_quadratures.zip
On 06/17/2018 04:29 PM, Vladislav Malyshkin wrote:
Juan,
it is now available from https://yadi.sk/d/AtPJ4a8copmZJ?locale=en
the file polynomial_code.June_17_2018.zip
Vladislav
On 06/17/2018 04:21 PM, Juan Pablo Carbajal wrote:
Hi,
There is little use of static zip sent around. Better set up a public
repository (gitlab, bitbucket, etc...) and share that.
I never linked java code to Octave, but since Java is a dependency of
Octave I can imagine it is very simple. Maybe you want to ask around
before investing time in re.writing your code.
I would say that the functionality is very important so if you do noot
have time to make a package of it, then we put it for the next summer
of code... or a bachelor student somewhere!
Regards,
On Sun, Jun 17, 2018 at 10:06 PM, Vladislav Malyshkin [hidden email] wrote:
Juan,
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
email: 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
Gausstype 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 builtin 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 reimplement that
code natively in octave, rather than do any javawrapper, 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 Gausstype quadratures calculation in
generalized basis is described in https://arxiv.org/pdf/1510.05510 ,
Appendix A & B, page 30.
Vladislav
P.S. To test the code
unzip polynomial_code.zip
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:
Hi,
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 [hidden email] wrote:
Octave currently has polynomials manipulation functionality
https://octave.org/doc/v4.0.3/PolynomialManipulations.html
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
Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
Laguerre, Hermite bases.
The code is available under GPL and is javawritten (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 &
B.
Let me know if you have any interest.
Vladislav
P.S. From the other alternative basis software I know only matlabwritten
http://www.chebfun.org/ by Alex Townsend, but his project has different
goals.


Hi Vlad,
I suggest the next following steps:
A. If you have time to do it yourself:
1.A Read about linking java and the octave interpreter
https://octave.org/doc/v4.4.0/JavaInterface.html2.A Prepare a package so we can help with the
testing. https://wiki.octave.org/Creating_packages, you can find some
slides and simple examples here
https://sites.google.com/site/octavecole/myforms/OctaveHSR_2018.zip?attredirects=0&d=1Also check other packages with java code, e.g. LTFAT
https://github.com/ltfat/ltfat/tree/master/blockprocI have never interfaced with Java myself so I have no clue how much
work that is. It seems like it shouldn't be too much.
B. If you do not have time:
1.B Prepare a description of the project
https://wiki.octave.org/Summer_of_Code_Project_IdeasOn Wed, Jun 20, 2018 at 9:01 AM, Vladislav Malyshkin < [hidden email]> wrote:
> Juan,
> generalized basis polynomial code is now also available from two places:
>
> http://www.ioffe.ru/LNEPS/malyshkin/code_polynomials_quadratures.zip> (referenced from my https://arxiv.org/pdf/1510.05510 paper, page 30)
> https://yadi.sk/d/AtPJ4a8copmZJ?locale=en , the file
> polynomial_code.June_17_2018.zip
>
> Vladislav
>
> #sha1sum polynomial_code.June_17_2018.zip code_polynomials_quadratures.zip
> d8dacf0c0573f850c38978a9fc97d70298e1fa68 polynomial_code.June_17_2018.zip
> d8dacf0c0573f850c38978a9fc97d70298e1fa68 code_polynomials_quadratures.zip
>
>
> On 06/17/2018 04:29 PM, Vladislav Malyshkin wrote:
>
> Juan,
> it is now available from https://yadi.sk/d/AtPJ4a8copmZJ?locale=en> the file polynomial_code.June_17_2018.zip
> Vladislav
>
> On 06/17/2018 04:21 PM, Juan Pablo Carbajal wrote:
>
> Hi,
>
> There is little use of static zip sent around. Better set up a public
> repository (gitlab, bitbucket, etc...) and share that.
> I never linked java code to Octave, but since Java is a dependency of
> Octave I can imagine it is very simple. Maybe you want to ask around
> before investing time in re.writing your code.
>
> I would say that the functionality is very important so if you do noot
> have time to make a package of it, then we put it for the next summer
> of code... or a bachelor student somewhere!
>
> Regards,
>
>
> On Sun, Jun 17, 2018 at 10:06 PM, Vladislav Malyshkin < [hidden email]>
> wrote:
>
> Juan,
> 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
> email: 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
> Gausstype 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 builtin 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 reimplement that
> code natively in octave, rather than do any javawrapper, 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 Gausstype quadratures calculation in
> generalized basis is described in https://arxiv.org/pdf/1510.05510 ,
> Appendix A & B, page 30.
>
> Vladislav
>
> P.S. To test the code
> unzip polynomial_code.zip
> 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:
>
> Hi,
>
> 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 < [hidden email]> wrote:
>
> Octave currently has polynomials manipulation functionality
> https://octave.org/doc/v4.0.3/PolynomialManipulations.html> 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
> Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
> Laguerre, Hermite bases.
> The code is available under GPL and is javawritten (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 &
> B.
> Let me know if you have any interest.
> Vladislav
> P.S. From the other alternative basis software I know only matlabwritten
> http://www.chebfun.org/ by Alex Townsend, but his project has different
> goals.
>
>
>
>


Juan,
Right now I have to finish some other things, but in any case
regardless of whether the final implementation will be done by me
or by somebody else the "Summer_of_Code_Project" need to be
written anyway, for the reason it requires an API to be be
introduced, and as you know, API selection is a very "political"
issue. Below I will try to write my first draft of Generalized
Polynomials API proposal, the extended version of which will be
added to the "Summer_of_Code_Project".
What do you think if I write API like below? With
javaimplementation available it will not be of much work either
to integrate my existing java code, or reimplement it natively in
octave (the code is simple, the most difficult part there  is
unit tests, but my java code does have all the unit tests needed).
Vladislav
P.S. proposal example:
Currenty
https://octave.org/doc/v4.0.3/PolynomialManipulations.html
perform polynomial manipulation only in monomial (x ^{k})
basis. This proposal to introduce octave class API with the goal
to manipulate polynomials in arbitrary basis.
1. In arbitrary Q _{k}(x) basis (e.g. Chebyshev, Hermite,
etc), a polynomial is represented as array coefficients
P(x)= a0*Q _{0}(x) + a1*Q _{1}(x) + a2*Q _{2}(x)
+a3*Q _{3}(x) + ...
The coefficients a0, a1, a2 are represented as vector elements a =
[a0, a1, a2, …, an]; vector (see
https://octave.org/doc/v4.2.1/CreatingaClass.html#CreatingaClass
example, note the order is different from
https://octave.org/doc/v4.0.3/PolynomialManipulations.html where
it is [an, ....,a2,a1,a0] example)
An instance of GeneralizedPolynomial class to implement the
following methods (like
com/polytechnik/utils/BasisPolynomials.java)
(return types: s scalar, []  vector)
 [] convertToMonomialFromBasis(a) convert a polynomial in
Tbasis to the polynomial in monomial basis
 [] convertToBasisFromMonomial(a) convert a polynomial in
monomial basis to the polynomial in Tbasis
 s calculateSum(p,x) calculate sum p[k1]Q_{k}(x)
 s calculateSumD1(p,x) calculate sum p[k1] d/dx Q_{k}(x)
 s calculateSumD2(p,x) calculate sum p[k1] d^{2}/dx^{2}
Q_{k}(x)
 [] differentiate(p) differentiate a polynomial
 [] Integrate(p) integrate
 [] getQjQkLinearization(j,k) expand Q_{j}Q_{k}
product as a sum c_{m}Q_{m}
 [] multiplyPQ(p,q) multiplies P*Q
 [] multiplyAxB(p,a,b) multiplies p*(ax+b)
 [[],s] sdiv1(p,x0) synthetic division p/(xx0), returns
quotient and remainder
 [[],[]] sdiv(p,q) synthetic division p/q, returns quotient
and remainder
 [[]] expandNewtonBinomialLike(m,a,b) expand Q_{m}(a(x+b))
as sum c_{k}Q_{k}(x)
 [] getXQmoments(Qmoments) given <Q_{k}(x)>
moments calculates <xQ_{k}(x)>
 [] getPQmoments(p,Qmoments) given <Q_{k}(x)>
moments and polynomial P(x) calculates <P(x)Q_{k}(x)>
 [][] getConfederateMatrix(p) given a polynomial, calculate
its confederate matrix (used to find polynomial roots)
2. The class GaussQuadratures calculates Gauss type quadratures
working in polynomial basis of GeneralizedPolynomial type.
This way input moments can be of <Q _{k}(x)> type,
not necessary <x ^{k}>. The methods
 .... about 10 methods from OrthogonalPolynomialsABasis.java
...
On 06/20/2018 03:11 AM, Juan Pablo Carbajal wrote:
Hi Vlad,
I suggest the next following steps:
A. If you have time to do it yourself:
1.A Read about linking java and the octave interpreter
https://octave.org/doc/v4.4.0/JavaInterface.html
2.A Prepare a package so we can help with the
testing.https://wiki.octave.org/Creating_packages, you can find some
slides and simple examples here
https://sites.google.com/site/octavecole/myforms/OctaveHSR_2018.zip?attredirects=0&d=1
Also check other packages with java code, e.g. LTFAT
https://github.com/ltfat/ltfat/tree/master/blockproc
I have never interfaced with Java myself so I have no clue how much
work that is. It seems like it shouldn't be too much.
B. If you do not have time:
1.B Prepare a description of the project
https://wiki.octave.org/Summer_of_Code_Project_Ideas
On Wed, Jun 20, 2018 at 9:01 AM, Vladislav Malyshkin [hidden email] wrote:
Juan,
generalized basis polynomial code is now also available from two places:
http://www.ioffe.ru/LNEPS/malyshkin/code_polynomials_quadratures.zip
(referenced from my https://arxiv.org/pdf/1510.05510 paper, page 30)
https://yadi.sk/d/AtPJ4a8copmZJ?locale=en , the file
polynomial_code.June_17_2018.zip
Vladislav
#sha1sum polynomial_code.June_17_2018.zip code_polynomials_quadratures.zip
d8dacf0c0573f850c38978a9fc97d70298e1fa68 polynomial_code.June_17_2018.zip
d8dacf0c0573f850c38978a9fc97d70298e1fa68 code_polynomials_quadratures.zip
On 06/17/2018 04:29 PM, Vladislav Malyshkin wrote:
Juan,
it is now available from https://yadi.sk/d/AtPJ4a8copmZJ?locale=en
the file polynomial_code.June_17_2018.zip
Vladislav
On 06/17/2018 04:21 PM, Juan Pablo Carbajal wrote:
Hi,
There is little use of static zip sent around. Better set up a public
repository (gitlab, bitbucket, etc...) and share that.
I never linked java code to Octave, but since Java is a dependency of
Octave I can imagine it is very simple. Maybe you want to ask around
before investing time in re.writing your code.
I would say that the functionality is very important so if you do noot
have time to make a package of it, then we put it for the next summer
of code... or a bachelor student somewhere!
Regards,
On Sun, Jun 17, 2018 at 10:06 PM, Vladislav Malyshkin [hidden email]
wrote:
Juan,
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
email: 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
Gausstype 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 builtin 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 reimplement that
code natively in octave, rather than do any javawrapper, 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 Gausstype quadratures calculation in
generalized basis is described in https://arxiv.org/pdf/1510.05510 ,
Appendix A & B, page 30.
Vladislav
P.S. To test the code
unzip polynomial_code.zip
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:
Hi,
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 [hidden email] wrote:
Octave currently has polynomials manipulation functionality
https://octave.org/doc/v4.0.3/PolynomialManipulations.html
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
Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
Laguerre, Hermite bases.
The code is available under GPL and is javawritten (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 &
B.
Let me know if you have any interest.
Vladislav
P.S. From the other alternative basis software I know only matlabwritten
http://www.chebfun.org/ by Alex Townsend, but his project has different
goals.


Juan,
I have made a first working octaveintegrated version, it
is available at https://yadi.sk/d/AtPJ4a8copmZJ?locale=en file
polynomial_code.July_05_2018.zip ("official" link
http://www.ioffe.ru/LNEPS/malyshkin/code_polynomials_quadratures.zip
currently outdated and will be updated to last version soon).
#sha1sum polynomial_code.July_05_2018.zip # last version
161af5c8f718590bf040a26435d18df633bb3eaa
polynomial_code.July_05_2018.zip
Java API was cleaned up/simplified for an easy octave access.
Recent versions of octave/matlab have a good java integration
functionality.
Once the polynomials_abasis.jar library is added to octave
classpath: javaaddpath (["/path/to/dir/FIXME",
"/polynomials_abasis.jar"]);
Polynomials manipulation in
Chebyshev/Legendre/ShiftedLegendre/Laguerre/HermiteE/Monomials
(implemented as
com/polytechnik/utils/BasisPolynomials.java interface) is easily
accessible from octave, for usage example see
com/polytechnik/utils/LebesgueQuadratures_call_java_example.m, (do
in octave):
run LebesgueQuadratures_call_java_example.m
The API has all regular operations (multiplication/synthetic
division/differentiation/integration/etc.), which are are
implemented for all 6 bases: e.g. to multiply P and Q just do
PmulQ=M.B.mult2Pol(P,Q); see polynomials_readme.txt file for short
description.
Second available API is
com/polytechnik/utils/OrthogonalPolynomialsABasis.java which
calculates Gauss/Lebesgue quadratures, Orthogonal
polynomials/Christoffel function/etc. uses aforementioned
polynomial basis interface. This allows to perform all the
calculations not from typical <x ^{k}> moments, but
from <Q _{k}(x)> moments, where Q _{k}(x) is
one 6 polynomial bases implemented. This greatly increase
numerical stability and increase range of options available.
Besides standard functionality there is an original Lebesgue
quadrature functionality (see my paper
https://arxiv.org/abs/1807.08197 ) implemented.
There is also pure octave, without java, (a small subset of
functionality, very slow, but simple and useful) implementation of
Lebesgue quadrature (Gaussian quadrature is special case
f(x)=x of Lebesgue quadrature) in
com/polytechnik/utils/LebesgueQuadraturesWithEVData.m (do in
octave):
run LebesgueQuadratures.m
for demonstration. This octaveclass implementation has only
Gauss/Lebesgue quadratures implemented, no polynomials of general
basis.
Vladislav
On 06/20/2018 04:22 AM, Vladislav Malyshkin wrote:
Juan,
Right now I have to finish some other things, but in any case
regardless of whether the final implementation will be done by
me or by somebody else the "Summer_of_Code_Project" need to be
written anyway, for the reason it requires an API to be be
introduced, and as you know, API selection is a very "political"
issue. Below I will try to write my first draft of Generalized
Polynomials API proposal, the extended version of which will be
added to the "Summer_of_Code_Project".
What do you think if I write API like below? With
javaimplementation available it will not be of much work either
to integrate my existing java code, or reimplement it natively
in octave (the code is simple, the most difficult part there 
is unit tests, but my java code does have all the unit tests
needed).
Vladislav
P.S. proposal example:
Currenty https://octave.org/doc/v4.0.3/PolynomialManipulations.html
perform polynomial manipulation only in monomial (x ^{k})
basis. This proposal to introduce octave class API with the goal
to manipulate polynomials in arbitrary basis.
1. In arbitrary Q _{k}(x) basis (e.g. Chebyshev, Hermite,
etc), a polynomial is represented as array coefficients
P(x)= a0*Q _{0}(x) + a1*Q _{1}(x) + a2*Q _{2}(x)
+a3*Q _{3}(x) + ...
The coefficients a0, a1, a2 are represented as vector elements a
= [a0, a1, a2, …, an]; vector (see https://octave.org/doc/v4.2.1/CreatingaClass.html#CreatingaClass
example, note the order is different from https://octave.org/doc/v4.0.3/PolynomialManipulations.html
where it is [an, ....,a2,a1,a0] example)
An instance of GeneralizedPolynomial class to implement the
following methods (like
com/polytechnik/utils/BasisPolynomials.java)
(return types: s scalar, []  vector)
 [] convertToMonomialFromBasis(a) convert a polynomial in
Tbasis to the polynomial in monomial basis
 [] convertToBasisFromMonomial(a) convert a polynomial in
monomial basis to the polynomial in Tbasis
 s calculateSum(p,x) calculate sum p[k1]Q_{k}(x)
 s calculateSumD1(p,x) calculate sum p[k1] d/dx Q_{k}(x)
 s calculateSumD2(p,x) calculate sum p[k1] d^{2}/dx^{2}
Q_{k}(x)
 [] differentiate(p) differentiate a polynomial
 [] Integrate(p) integrate
 [] getQjQkLinearization(j,k) expand Q_{j}Q_{k}
product as a sum c_{m}Q_{m}
 [] multiplyPQ(p,q) multiplies P*Q
 [] multiplyAxB(p,a,b) multiplies p*(ax+b)
 [[],s] sdiv1(p,x0) synthetic division p/(xx0), returns
quotient and remainder
 [[],[]] sdiv(p,q) synthetic division p/q, returns quotient
and remainder
 [[]] expandNewtonBinomialLike(m,a,b) expand Q_{m}(a(x+b))
as sum c_{k}Q_{k}(x)
 [] getXQmoments(Qmoments) given <Q_{k}(x)>
moments calculates <xQ_{k}(x)>
 [] getPQmoments(p,Qmoments) given <Q_{k}(x)>
moments and polynomial P(x) calculates <P(x)Q_{k}(x)>
 [][] getConfederateMatrix(p) given a polynomial, calculate
its confederate matrix (used to find polynomial roots)
2. The class GaussQuadratures calculates Gauss type
quadratures working in polynomial basis of GeneralizedPolynomial
type.
This way input moments can be of <Q _{k}(x)> type,
not necessary <x ^{k}>. The methods
 .... about 10 methods from
OrthogonalPolynomialsABasis.java ...
On 06/20/2018 03:11 AM, Juan Pablo Carbajal wrote:
Hi Vlad,
I suggest the next following steps:
A. If you have time to do it yourself:
1.A Read about linking java and the octave interpreter
https://octave.org/doc/v4.4.0/JavaInterface.html
2.A Prepare a package so we can help with the
testing.https://wiki.octave.org/Creating_packages, you can find some
slides and simple examples here
https://sites.google.com/site/octavecole/myforms/OctaveHSR_2018.zip?attredirects=0&d=1
Also check other packages with java code, e.g. LTFAT
https://github.com/ltfat/ltfat/tree/master/blockproc
I have never interfaced with Java myself so I have no clue how much
work that is. It seems like it shouldn't be too much.
B. If you do not have time:
1.B Prepare a description of the project
https://wiki.octave.org/Summer_of_Code_Project_Ideas
On Wed, Jun 20, 2018 at 9:01 AM, Vladislav Malyshkin [hidden email] wrote:
Juan,
generalized basis polynomial code is now also available from two places:
http://www.ioffe.ru/LNEPS/malyshkin/code_polynomials_quadratures.zip
(referenced from my https://arxiv.org/pdf/1510.05510 paper, page 30)
https://yadi.sk/d/AtPJ4a8copmZJ?locale=en , the file
polynomial_code.June_17_2018.zip
Vladislav
#sha1sum polynomial_code.June_17_2018.zip code_polynomials_quadratures.zip
d8dacf0c0573f850c38978a9fc97d70298e1fa68 polynomial_code.June_17_2018.zip
d8dacf0c0573f850c38978a9fc97d70298e1fa68 code_polynomials_quadratures.zip
On 06/17/2018 04:29 PM, Vladislav Malyshkin wrote:
Juan,
it is now available from https://yadi.sk/d/AtPJ4a8copmZJ?locale=en
the file polynomial_code.June_17_2018.zip
Vladislav
On 06/17/2018 04:21 PM, Juan Pablo Carbajal wrote:
Hi,
There is little use of static zip sent around. Better set up a public
repository (gitlab, bitbucket, etc...) and share that.
I never linked java code to Octave, but since Java is a dependency of
Octave I can imagine it is very simple. Maybe you want to ask around
before investing time in re.writing your code.
I would say that the functionality is very important so if you do noot
have time to make a package of it, then we put it for the next summer
of code... or a bachelor student somewhere!
Regards,
On Sun, Jun 17, 2018 at 10:06 PM, Vladislav Malyshkin [hidden email]
wrote:
Juan,
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
email: 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
Gausstype 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 builtin 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 reimplement that
code natively in octave, rather than do any javawrapper, 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 Gausstype quadratures calculation in
generalized basis is described in https://arxiv.org/pdf/1510.05510 ,
Appendix A & B, page 30.
Vladislav
P.S. To test the code
unzip polynomial_code.zip
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:
Hi,
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 [hidden email] wrote:
Octave currently has polynomials manipulation functionality
https://octave.org/doc/v4.0.3/PolynomialManipulations.html
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
Gausstype quadratures calculation) in the basis of Chebyshev, Legendre,
Laguerre, Hermite bases.
The code is available under GPL and is javawritten (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 &
B.
Let me know if you have any interest.
Vladislav
P.S. From the other alternative basis software I know only matlabwritten
http://www.chebfun.org/ by Alex Townsend, but his project has different
goals.


Hi Vladislav,
This is pretty cool. Shall I understand then that the Summer of code
project is not necessary anymore?
Give me some time to test you code. The enxt step, I guess, is to put
it into the shape of a package so it can be installed with "pkg
install"
Regards,


Juan,
Yes, I now I do have a working implementation. For a task for
Summer of code project  it can be, say to write a proper package
documentation.
Currently there are (mostly independent) three piece of
code:
 Polynomial calculations in generalized basis API and
implementation. Look at BasisPolynomials.java API, do you see
any issues (a couple of internal methods are not pretty, but
these few were written for extremely fast execution in mind
and are not supposed to be called from octave). In recent
octave it is really easy to call java method, octave
calls it directly, no wrapper is needed, and typical
multiplication/differentiation/integration/f(x)/Df(x)/etc. can
be called clean and simple from octave, see my mult2Pol
example.
 Orthogonal polynomials/quadratures/Christoffel function/etc.
relatively an arbitrary measure using one of 6
implemented polynomial bases, the file
OrthogonalPolynomialsABasis.java
 Gauss/Lebesgue quadratures LebesgueQuadraturesWithEVData.m
(a small subset of OrthogonalPolynomialsABasis functionality,
e.g. there is no multiplication operator, <Q_{j}Q_{k}>
is calculated directly as n^{2} complexity instead on
2n if multiplication is used. But this
LebesgueQuadraturesWithEVData.m code is so small, so
simple, octavenative, and works good enough, that many
people found it very useful despite all its deficiencies.
I think it is more of "political" issue now: what API to chose and
what to include into the package. Look at what I sent you, may be
you like/do not like some things. Especially run/look at octave
examples LebesgueQuadratures.m and
,LebesgueQuadratures_call_java_example.m to decide what you
like/do not like.
Vladislav
On 07/24/2018 03:58 PM, Juan Pablo Carbajal wrote:
Hi Vladislav,
This is pretty cool. Shall I understand then that the Summer of code
project is not necessary anymore?
Give me some time to test you code. The enxt step, I guess, is to put
it into the shape of a package so it can be installed with "pkg
install"
Regards,

