[CLN-list] modular polynomials

Alexei Sheplyakov varg at theor.jinr.ru
Sat Sep 27 20:51:45 CEST 2008


Hello!

On Sat, Sep 27, 2008 at 04:48:03PM +0200, Bruno Haible wrote:
 
> You can introduce a new class, say, cl_UP_coefficients or cl_UP_embryo, that
> has a set_coeff method and a finalize method that returns a cl_UP. cl_UP will
> lose these methods, but have a constructor that takes a cl_UP_coefficients
> argument.

Changing the coefficients is a common operation (think of division, GCD,
etc). So this crippled^W immutable cl_UP is next to useless.
 
> 2) The other option is to keep the current design and have set_coeff and
> finalize throw an exception when the reference count is > 1. And, of course,
> document the behaviour

I think this is the only sane option.

> and provide a separate function for "deep copying" of a polynomial.

What about a copy constructor?

Best regards,
	Alexei

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/cln-list/attachments/20080927/5c06689a/attachment.sig 


More information about the CLN-list mailing list