Debian Codegraph @

common/types/traits/math.go

raw symbols SCIP
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package traitsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/
16
17 import "github.com/google/cel-go/common/types/refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/"
18
19 // Adder interface to support '+' operator overloads.
20 type Adderscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Adder# interface {
21 // Add returns a combination of the current value and other value.
22 //
23 // If the other value is an unsupported type, an error is returned.
24 Addscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Adder#Add.(other refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
25 }
26
27 // Divider interface to support '/' operator overloads.
28 type Dividerscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Divider# interface {
29 // Divide returns the result of dividing the current value by the input
30 // denominator.
31 //
32 // A denominator value of zero results in an error.
33 Dividescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Divider#Divide.(denominator refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
34 }
35
36 // Modder interface to support '%' operator overloads.
37 type Modderscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Modder# interface {
38 // Modulo returns the result of taking the modulus of the current value
39 // by the denominator.
40 //
41 // A denominator value of zero results in an error.
42 Moduloscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Modder#Modulo.(denominator refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
43 }
44
45 // Multiplier interface to support '*' operator overloads.
46 type Multiplierscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Multiplier# interface {
47 // Multiply returns the result of multiplying the current and input value.
48 Multiplyscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Multiplier#Multiply.(other refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
49 }
50
51 // Negater interface to support unary '-' and '!' operator overloads.
52 type Negaterscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Negater# interface {
53 // Negate returns the complement of the current value.
54 Negatescip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Negater#Negate.() refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
55 }
56
57 // Subtractor interface to support binary '-' operator overloads.
58 type Subtractorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Subtractor# interface {
59 // Subtract returns the result of subtracting the input from the current
60 // value.
61 Subtractscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/traits`/Subtractor#Subtract.(subtrahend refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#) refscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/.Valscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common/types/ref`/Val#
62 }