Bug 319603 - Work with polynomials
Summary: Work with polynomials
Status: REPORTED
Alias: None
Product: analitza
Classification: Frameworks and Libraries
Component: core (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-10 04:31 UTC by Percy Camilo Triveño Aucahuasi
Modified: 2021-03-09 05:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Percy Camilo Triveño Aucahuasi 2013-05-10 04:31:51 UTC
1) Sometimes you need to know is the expression is a polynomial, so for example:

x*x+y*y+sin(x) is not but
x*x+y*y it is

Note that 
x*x+y*y+sin(a) is a polynomail if a is some parameter (in Variables module)

bool Expression::isPolynomail(const Expression &exp, Variables var);

2) Also it would be very convenient if the API can report if a polynomial expression is univariate, bivariate, etc 

API: to report if a polynomial if bivariate I guess you just need to convert the expression to lambda and count the bvars (and omit the paramaters/variables in Variables mod) ... you can choose the name of the API.

3) And the degree/order or the polynomail.

int Expression::polynomailDegree(const Expression &exp, Variables var);

4) Construct a (univariate) polynomial from roots.

if the input is 1,2 then you return (x-1)*(x-2)

Expression Expression::createPolynomial(const QVector<double> &roots)


Reproducible: Always
Comment 1 Justin Zobel 2021-03-09 05:23:04 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.