mirror of
https://github.com/tuneinsight/lattigo.git
synced 2025-09-13 03:27:14 +00:00
correctly copy ringqp polynomial
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/tuneinsight/lattigo/v5/ring"
|
"github.com/tuneinsight/lattigo/v5/ring"
|
||||||
"github.com/tuneinsight/lattigo/v5/utils"
|
|
||||||
"github.com/tuneinsight/lattigo/v5/utils/buffer"
|
"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.
|
// Copy copies the coefficients of other on the target polynomial.
|
||||||
// This method simply calls the Copy method for each of its sub-polynomials.
|
// This method simply calls the Copy method for each of its sub-polynomials.
|
||||||
func (p *Poly) Copy(other Poly) {
|
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.
|
// CopyLvl copies the values of other on the target polynomial.
|
||||||
|
|||||||
Reference in New Issue
Block a user