diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2025-08-01 16:28:43 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2025-08-01 16:28:43 +0200 |
| commit | 4ce648df90034d7dade55cadd5bd6251619cf922 (patch) | |
| tree | f22b8a52b1804f0680b292f33f21a28cfc3961a7 | |
| parent | ff6fd1144763e42f29710ed23ef7016442a03c9a (diff) | |
Remove `conjugate`
It only makes sense for fields implemented as towers, which is NOT what
we did here.
| -rw-r--r-- | lib/field.ml | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/field.ml b/lib/field.ml index 2f62dad..c7bb66d 100644 --- a/lib/field.ml +++ b/lib/field.ml @@ -83,10 +83,6 @@ module type SX = sig val to_coeffs : t -> f array (** [to_coeffs a] are the polynomial coefficients of [a]. *) - - val conjugate : t -> t - (** [conjugate a] is the conjugate of the polynomial in the extension field. - *) end module Make (PRIME : sig @@ -268,12 +264,6 @@ end) : SX with type f = POLY.F.t = struct let res = loop a 0 one in if Z.sign exp >= 0 then res else inv res - let conjugate a = - let half = degree / 2 in - let same = Array.to_seq a |> Seq.drop half |> Seq.for_all F.(equal zero) in - if same then a - else Array.mapi (fun i c -> if i < half then c else F.neg c) a - let sub a b = add a (neg b) let div a b = mul a (inv b) let ( ~- ) = neg |
