From 96b11fc9172684e90de1892ffd9cf5e803471915 Mon Sep 17 00:00:00 2001 From: Andrea Caforio Date: Tue, 4 Jun 2024 16:15:50 +0200 Subject: [PATCH] correctly copy ringqp polynomial --- ring/ringqp/poly.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ring/ringqp/poly.go b/ring/ringqp/poly.go index 8acc6773..611c64ae 100644 --- a/ring/ringqp/poly.go +++ b/ring/ringqp/poly.go @@ -5,7 +5,6 @@ import ( "io" "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v5/utils" "github.com/tuneinsight/lattigo/v5/utils/buffer" ) @@ -55,7 +54,8 @@ func (p Poly) Equal(other *Poly) (v bool) { // Copy copies the coefficients of other on the target polynomial. // This method simply calls the Copy method for each of its sub-polynomials. func (p *Poly) Copy(other Poly) { - p.CopyLvl(utils.Min(p.LevelQ(), other.LevelQ()), utils.Min(p.LevelP(), other.LevelP()), other) + p.Q.Copy(other.Q) + p.P.Copy(other.P) } // CopyLvl copies the values of other on the target polynomial.