- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for orderedAbs (0.17 sec)
-
src/cmd/compile/internal/syntax/testdata/linalg.go
type Complex interface { ~complex64 | ~complex128 } // OrderedAbs is a helper type that defines an Abs method for // ordered numeric types. type OrderedAbs[T OrderedNumeric] T func (a OrderedAbs[T]) Abs() OrderedAbs[T] { if a < 0 { return -a } return a } // ComplexAbs is a helper type that defines an Abs method for // complex types.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 30 18:02:18 UTC 2022 - 2.1K bytes - Viewed (0) -
test/typeparam/absdiffimp.dir/a.go
~complex64 | ~complex128 } // For now, a lone type parameter is not permitted as RHS in a type declaration (issue #45639). // // orderedAbs is a helper type that defines an Abs method for // // ordered numeric types. // type orderedAbs[T orderedNumeric] T // // func (a orderedAbs[T]) Abs() orderedAbs[T] { // if a < 0 { // return -a // } // return a // } // // // complexAbs is a helper type that defines an Abs method for
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 00:11:24 UTC 2021 - 2.1K bytes - Viewed (0) -
src/internal/types/testdata/check/linalg.go
~complex64 | ~complex128 } // For now, a lone type parameter is not permitted as RHS in a type declaration (issue #45639). // // OrderedAbs is a helper type that defines an Abs method for // // ordered numeric types. // type OrderedAbs[T OrderedNumeric] T // // func (a OrderedAbs[T]) Abs() OrderedAbs[T] { // if a < 0 { // return -a // } // return a // } //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 2.2K bytes - Viewed (0) -
test/typeparam/absdiffimp2.dir/a.go
type Complex interface { ~complex64 | ~complex128 } // orderedAbs is a helper type that defines an Abs method for // a struct containing an ordered numeric type. type orderedAbs[T orderedNumeric] struct { Value_ T } func (a orderedAbs[T]) Abs() T { if a.Value_ < 0 { return -a.Value_ } return a.Value_ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 09 21:26:42 UTC 2022 - 2.8K bytes - Viewed (0) -
test/typeparam/absdiff2.go
type Complex interface { ~complex64 | ~complex128 } // orderedAbs is a helper type that defines an Abs method for // a struct containing an ordered numeric type. type orderedAbs[T orderedNumeric] struct { Value_ T } func (a orderedAbs[T]) Abs() T { if a.Value_ < 0 { return -a.Value_ } return a.Value_ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 09 21:26:42 UTC 2022 - 3.6K bytes - Viewed (0) -
src/go/parser/testdata/linalg.go2
type Complex interface { ~complex64|~complex128 } // OrderedAbs is a helper type that defines an Abs method for // ordered numeric types. type OrderedAbs[T OrderedNumeric] T func (a OrderedAbs[T]) Abs() OrderedAbs[T] { if a < 0 { return -a } return a } // ComplexAbs is a helper type that defines an Abs method for // complex types.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 15:34:22 UTC 2021 - 2K bytes - Viewed (0) -
test/typeparam/absdiff.go
~complex64 | ~complex128 } // For now, a lone type parameter is not permitted as RHS in a type declaration (issue #45639). // // orderedAbs is a helper type that defines an Abs method for // // ordered numeric types. // type orderedAbs[T orderedNumeric] T // // func (a orderedAbs[T]) Abs() orderedAbs[T] { // if a < 0 { // return -a // } // return a // } // // // complexAbs is a helper type that defines an Abs method for
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 2.9K bytes - Viewed (0) -
src/internal/types/testdata/check/typeinst1.go
func AbsDifference[T NumericAbs[T]](x T) { panic(0) } // For now, a lone type parameter is not permitted as RHS in a type declaration (issue #45639). // type OrderedAbs[T any] T // // func (a OrderedAbs[T]) Abs() OrderedAbs[T] // // func OrderedAbsDifference[T any](x T) { // AbsDifference(OrderedAbs[T](x)) // } // same code, reduced to essence func g[P interface{ m() P }](x P) { panic(0) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 5.7K bytes - Viewed (0) -
src/debug/gosym/symtab_test.go
} func TestGenericNames(t *testing.T) { s1 := Sym{Name: "main.set[int]"} s2 := Sym{Name: "main.(*value[int]).get"} s3 := Sym{Name: "a/b.absDifference[c/d.orderedAbs[float64]]"} s4 := Sym{Name: "main.testfunction[.shape.int]"} assertString(t, fmt.Sprintf("package of %q", s1.Name), s1.PackageName(), "main") assertString(t, fmt.Sprintf("package of %q", s2.Name), s2.PackageName(), "main")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 09 11:28:56 UTC 2022 - 4.3K bytes - Viewed (0) -
src/sort/example_multi_test.go
} // Simple use: Sort by user. OrderedBy(user).Sort(changes) fmt.Println("By user:", changes) // More examples. OrderedBy(user, increasingLines).Sort(changes) fmt.Println("By user,<lines:", changes) OrderedBy(user, decreasingLines).Sort(changes) fmt.Println("By user,>lines:", changes) OrderedBy(language, increasingLines).Sort(changes)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 13 20:16:24 UTC 2022 - 4K bytes - Viewed (0)