TypeMat¶
- class dsviper.TypeMat(numeric_type, columns, rows)¶
Bases:
TypeThe mat<numeric_type, columns, rows> type.
numeric_type is one of the integer or floating-point primitives, Type.UINT8 through Type.DOUBLE; Type.BOOL and Type.STRING raise. columns and rows are each at least 1, and 0 raises. The accessor that reads numeric_type back is element_type(), and ValueMat builds values of it.
- columns() int¶
Return the number of columns.
- description(*, namespace: NameSpace | None = None) str¶
Return the same as representation(): mat<element_type, columns, rows>, qualified against namespace.
- element_type() _NumericTypes¶
Return the numeric type of one component.
- elements_type() TypeVector¶
Return vector<element_type>, the type a whole component listing has.
- representation(*, namespace: NameSpace | None = None) str¶
Return the type written out as mat<element_type, columns, rows>, with the names qualified against namespace - the global namespace when it is None.
- rows() int¶
Return the number of rows.
- runtime_id() ValueUUId¶
Return the uuid identifying this type.
It is computed from what the type is, so the same declaration yields the same id in any Definitions. Definitions says what each kind is computed from.
- type_code() str¶
Return the code naming this kind of type, such as “int32”, “struct” or “vector”.