PDA

View Full Version : polynomial



pipapongo
23rd April 2013, 09:02
hi evrybody,

i am looking for an existing class for a polynomial like a_1*x^n a_2*x^(n-1) + ... +a_m;
i searched this forum and asked google but i have nothing found which seems pretty awkward. Is there really no standartclass??
i would have done it allready but i need it to be very fast and thats not what my classes are in general :-) --> still quite new to c++ / Qt.

thanks in advance

wysota
23rd April 2013, 09:07
How is this question related to Qt?

pipapongo
23rd April 2013, 11:28
my question is if Qt offers a way to do that, or what would be the best approach.

do i use standart c++ with an dynamic array for the coefficiants or ahall i use QList. do i loose performance when i take QList?

thanks

wysota
23rd April 2013, 11:34
No, Qt does not offer any classes for handling mathematical expressions.

ChrisW67
23rd April 2013, 23:07
I'm still puzzling over what such a 'class' would do other than evaluate the expression for given inputs.

amleto
23rd April 2013, 23:24
if he needs it 'to be fast', then I would hazard a guess at root solving.

wysota
24th April 2013, 00:04
... or rendering the expression.

alainstgt
24th April 2013, 00:46
just Google "c++ polynomial class" and you´ll get a lot of answers

Alain