Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Package dtype provides a definition of a Dtype, which is a part of the type system that Gorgonia uses.

License

NotificationsYou must be signed in to change notification settings

gorgonia/dtype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package dtype provides a definition of a Dtype, which is a part of the type system that Gorgonia uses.

The main type that this package provides isDtype{}.Dtype is used within the Gorgonia family of libraries in its type system.

Further, this package also provides some definitions for type classes. These type classes are also used in the Gorgonia family of libraries.

Type Classes

What is a type class? A type class is a set of types that all have a particular feature.

Consider for example, astring and anint. Both these types allow a notion of "addition" - e.g.

// string "addition".s := "hello"s += "world"// int addition.i := 1i += 1

So they are to be found in a type class calledAddable.

Note that this library DOES NOT enforce the features. Instead, think of this library as holding a collection of known types that does a particular thing.

The list of type classes are:

Type ClassWhat It Does/For
AllA collection of known types in Gorgonia's type system.
SpecializedA collection of types that receives specialized support/operations within Gorgonia's engines.
AddableTypes whose values can be "added" together.
NumberTypes whose values are numbers.
OrdTypes whose values can be sorted in order.
EqTypes whose values can be compared for equality.
UnsignedTypes whose values are unsigned numbers.
SignedTypes whose values are signed numbers.
SignedNonComplexTypes whose values are signed numbers, and are not complex numbers.
FloatsTypes whose values are represented by floating point numbers.
ComplexesTypes whose values are represented by floating point complex numbers.
FloatComplexTypes whose values are floating point numbers or complex numbers made up of floating point numbers.
NonComplexNumberTypes whose values are not complex numbers.
GeneratableTypes whose values are generatable by a random number generator (strings are also generatable)

About

Package dtype provides a definition of a Dtype, which is a part of the type system that Gorgonia uses.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp