MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / ConstantValue

Method ConstantValue

ecgo/builder/builder.go:112–118  ·  view source on GitHub ↗

ConstantValue returns always returns (nil, false) now, since the Golang frontend doesn't know the values of variables.

(v frontend.Variable)

Source from the content-addressed store, hash-verified

110
111// ConstantValue returns always returns (nil, false) now, since the Golang frontend doesn't know the values of variables.
112func (builder *builder) ConstantValue(v frontend.Variable) (*big.Int, bool) {
113 coeff, ok := builder.constantValue(builder.toVariableId(v))
114 if !ok {
115 return nil, false
116 }
117 return builder.field.ToBigInt(coeff), true
118}
119
120func (builder *builder) constantValue(x int) (constraint.Element, bool) {
121 i := builder.varConstId[x]

Callers

nothing calls this directly

Calls 3

constantValueMethod · 0.95
toVariableIdMethod · 0.95
ToBigIntMethod · 0.65

Tested by

no test coverage detected