Commit faf02c8a by Laurent Belcour

### Working on rational function

parent bf204fbf
 ... ... @@ -57,8 +57,32 @@ vec rational_function::value(const vec& x) const return res ; } bool compare(std::vector > a, std::vector b) { bool current = false; for(int i=0; i& vec, int N, int k, int j) { // Already used vectors std::vector > already_used ; vec[0] = k ; if(j == 0) return ; ... ... @@ -66,6 +90,8 @@ void populate(std::vector& vec, int N, int k, int j) int tj = j ; while(tj != 0) { already_used.push_back(vec) ; // First non null index int nn_index = 0; while(vec[nn_index] == 0) { nn_index = (nn_index+1) % N ; } ... ... @@ -79,6 +105,7 @@ void populate(std::vector& vec, int N, int k, int j) } } std::vector rational_function::index2degree(int i) const { std::vector deg ; deg.assign(dimX(), 0) ; ... ... @@ -100,7 +127,6 @@ std::vector rational_function::index2degree(int i) const // Populate the vector from front to back int j = i-Nk ; populate(deg, dimX(), k, j) ; return deg ; } ... ...
 ... ... @@ -50,7 +50,7 @@ class rational_function : public QObject, public function void save_rational_function(const std::string& filename) const ; void save_gnuplot(const std::string& filename, const data* d, const arguments& args) const ; protected: // functions // protected: // functions // Convert an index in N to a vector of degree for a // multinomial coeffcient. The resulting vector v should ... ...
 ... ... @@ -55,6 +55,7 @@ bool rational_fitter_cgal::fit_data(const data* dat, function* fit) r->setMin(d->min()) ; r->setMax(d->max()) ; std::cout << "<> np in [" << _min_np << ", " << _max_np << "] & nq in [" << _min_nq << ", " << _max_nq << "]" << std::endl ; ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!