type_info¶
- class wrenfold.type_info.CustomType¶
 A custom type describes a user-provided struct that exposes members that wrenfold can retrieve in generated code.
- __eq__(self: wrenfold.type_info.CustomType, other: wrenfold.type_info.CustomType) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- __hash__(self: wrenfold.type_info.CustomType) int¶
 Compute hash.
- __init__(self: wrenfold.type_info.CustomType, name: str, fields: list[tuple[str, object]], python_type: type) None¶
 Construct custom type.
- property fields¶
 A list of
wrenfold.type_info.StructFieldobjects.
- is_identical_to(self: wrenfold.type_info.CustomType, other: wrenfold.type_info.CustomType) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- property name¶
 Name of the struct.
- property python_type¶
 Retrieve the underlying user-declared python type.
- property total_size¶
 Total number of scalar expressions in the custom type and all of its children.
- class wrenfold.type_info.MatrixType¶
 A 2D matrix-valued type.
- __eq__(self: wrenfold.type_info.MatrixType, other: wrenfold.type_info.MatrixType) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- __hash__(self: wrenfold.type_info.MatrixType) int¶
 Compute hash.
- __init__(self: wrenfold.type_info.MatrixType, rows: int, cols: int) None¶
 Construct with number of rows and columns.
- property cols¶
 Second dimension of the matrix.
- compute_indices(self: wrenfold.type_info.MatrixType, idx: int) tuple[int, int]¶
 Given a flat index, compute the (row, column) pair it corresponds to.
- is_identical_to(self: wrenfold.type_info.MatrixType, other: wrenfold.type_info.MatrixType) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- property rows¶
 First dimension of the matrix.
- property shape¶
 Shape as a tuple of
(rows, cols).
- class wrenfold.type_info.NumericType¶
 Members:
Bool : Boolean value.
Integer : Signed integral value.
Float : Floating-point value.
- __eq__(self: object, other: object) bool¶
 
- __hash__(self: object) int¶
 
- __index__(self: wrenfold.type_info.NumericType) int¶
 
- __init__(self: wrenfold.type_info.NumericType, value: int) None¶
 
- __int__(self: wrenfold.type_info.NumericType) int¶
 
- __ne__(self: object, other: object) bool¶
 
- __str__(self: object) str¶
 
- property name¶
 
- class wrenfold.type_info.ScalarType¶
 A scalar-valued type.
- __eq__(self: wrenfold.type_info.ScalarType, other: wrenfold.type_info.ScalarType) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- __hash__(self: wrenfold.type_info.ScalarType) int¶
 Compute hash.
- __init__(self: wrenfold.type_info.ScalarType, numeric_type: wrenfold.type_info.NumericType) None¶
 Construct with
NumericType.
- is_identical_to(self: wrenfold.type_info.ScalarType, other: wrenfold.type_info.ScalarType) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- property numeric_type¶
 Access underlying
NumericTypeenum.
- class wrenfold.type_info.StructField¶
 Describes a field on a struct. The
wrenfold.type_info.CustomTypecontains a list of fields.- __eq__(self: wrenfold.type_info.StructField, other: wrenfold.type_info.StructField) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- __hash__(self: wrenfold.type_info.StructField) int¶
 Compute hash.
- __init__(*args, **kwargs)¶
 
- is_identical_to(self: wrenfold.type_info.StructField, other: wrenfold.type_info.StructField) bool¶
 Check for strict equality. This is not the same as mathematical equivalence.
- property name¶
 Name of the field.
- property type¶
 Type of the field.