Logo Search packages:      
Sourcecode: inkscape version File versions

SBasis Geom::poly_to_sbasis ( Poly const &  p  ) 

Changes the basis of p to be sbasis.

Parameters:
p the Monomial basis polynomial
Returns:
the Symmetric basis polynomial
This algorithm is horribly slow and numerically terrible. Only for testing.

Definition at line 11 of file sbasis-poly.cpp.

                                      {
    SBasis x = Linear(0, 1);
    SBasis r;
    
    for(int i = p.size()-1; i >= 0; i--) {
        r = SBasis(Linear(p[i], p[i])) + multiply(x, r);
    }
    r.normalize();
    return r;
      
}


Generated by  Doxygen 1.6.0   Back to index