Skip to content

Commit

Permalink
docs: Eval example
Browse files Browse the repository at this point in the history
  • Loading branch information
ivokub committed Nov 20, 2024
1 parent 8953c75 commit f06bea5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions std/math/emulated/field_mul.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,12 @@ type multivariate[T FieldParams] struct {
//
// NB! This is experimental API. It does not support negative coefficients. It
// does not check that computing the term wouldn't overflow the field.
//
// For example, for computing the expression x^2 + 2xy + y^2 we would call
//
// f.Eval([][]*Element[T]{{x,x}, {x,y}, {y,y}}, []int{1, 2, 1})
//
// The method returns the result of the evaluation.
func (f *Field[T]) Eval(at [][]*Element[T], coefs []int) *Element[T] {
if len(at) != len(coefs) {
panic("terms and coefficients mismatch")
Expand Down

0 comments on commit f06bea5

Please sign in to comment.