concepts.dsl.dsl_types#
Data structures for custom types in a DSL.
All types extend the base class TypeBase
.
TypeBase
has four derived types:
- :class:`ObjectType`: corresponds to an object in the physical world.
- :class:`ValueType`: corresponds to an encoding of a feature of the object.
- :class:`Sequence`: corresponds to a tuple type, a list type, or a multidimensional list type.
- :class:`~concepts.dsl.dsl_functions.FunctionType`: corresponds to a function over the encodings.
- :class:`~concepts.dsl.dsl_functions.OverloadedFunctionType`: corresponds to a collection of functions that share the same name.
- :class:`UnionType`: corresponds to a union of types.
Furthermore, ValueType
has four derived types:
- :class:`ConstantType`: corresponds to a constant.
- :class:`TensorValueTypeBase`: corresponds to a tensor-based encoding.
- :class:`PyObjValueType`: corresponds to an arbitrary Python object.
TensorValueTypeBase
has three derived types:
- :class:`ScalarValueType`: corresponds to a scalar value.
- :class:`VectorValueType`: corresponds to a vector.
- :class:`NamedTensorValueType`: corresponds to a named tensor.
SequenceType
has two derived types:
- :class:`TupleType`: corresponds to a tuple.
- :class:`ListType`: corresponds to a list. This type is also of type :class:`VariableSizedSequenceType`.
- :class:`MultidimensionalListType`: corresponds to a multidimensional list. This type is also of type :class:`VariableSizedSequenceType`.
Module attributes
AutoType means the type will be automatically inferred later. |
|
The "quantified index" object, used to indicate a quantified dimension in a tensor value type. |
Functions
|
Check if the type is AnyType. |
|
Check if the type is AutoType. |
Classes
The ConstantType corresponds to a constant value. |
|
FormatContext is a context manager that controls the format of types and objects. |
|
The class representing a constant object in a DSL. |
|
The ObjectType corresponds to the type of "real-world" objects. |
|
The basic sequence type. |
|
A value type refers to a type of some features associated with physical objects. |
|
Base class for all types. |
|
The UnionType is a type that is the union of multiple types. |
|
The ValueType corresponds to a value of a certain type. |
|
The class representing a variable in a function. |
|