package tezos-bls12-381-polynomial

  1. Overview
  2. Docs

Module Bls12_381_polynomial.CarraySource

Sourcemodule Fr = Bls12_381.Fr
Sourcemodule Stubs : sig ... end
Sourcemodule Carray : sig ... end
include module type of struct include Carray end
Sourcetype scalar = Bls12_381.Fr.t
Sourcetype t = Stubs.fr_array * int
Sourceval allocate : int -> Stubs.fr_array

allocate len creates a C array of size len intialized with zeros of blst_fr

Sourceval erase : t -> unit

erase c overwrites a C array c with zeros of blst_fr

Sourceval length : t -> int

length c returns the length of a C array c

Sourceval get : t -> int -> scalar

get c i returns the i-th element of a C array c

Sourceval copy : ?offset:int -> ?len:int -> t -> t

copy c returns a copy of a C array c

Sourceval to_string : t -> string

to_string c returns the string representation of a C array c

Sourceval to_array : t -> scalar array

to_array c converts a C array c to an OCaml array

Sourceval of_array : scalar array -> t

of_array c converts an OCaml array c to a C array

Sourceval equal : t -> t -> bool

equal a b checks whether a C array a is equal to a C array b

Note: equal is defined as polynomial equality, i.e., a and b can have different sizes and padded with zeros of blst_fr

OCaml

Innovation. Community. Security.