MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Union

Method Union

checker/cost.go:151–160  ·  view source on GitHub ↗

Union returns a SizeEstimate that encompasses both input the SizeEstimate.

(size SizeEstimate)

Source from the content-addressed store, hash-verified

149
150// Union returns a SizeEstimate that encompasses both input the SizeEstimate.
151func (se SizeEstimate) Union(size SizeEstimate) SizeEstimate {
152 result := se
153 if size.Min < result.Min {
154 result.Min = size.Min
155 }
156 if size.Max > result.Max {
157 result.Max = size.Max
158 }
159 return result
160}
161
162// AsCost converts a size estimates to an equivalent cost estimate.
163func (se SizeEstimate) AsCost() CostEstimate {

Callers 5

costCallMethod · 0.95
costCreateListMethod · 0.95
costCreateMapMethod · 0.95
unionMethod · 0.45
functionCostMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected