Kind
- class Kind
Description
A kind of specification.
Kinds are implicitly assignable to any specific quantities of that kind. This is effectively a new type over
Specificationfor better interface typing.Inheritance:
Members defined in
Kind(11 members)RExact exponents of each nonzero dimension.
RThe expression use to derive this quantity specification.
RWhether this specification is the root of its hierarchy, i.e. a named specification without a parent.
RName given to this quantity specification, e.g.
length,width.RThe expression owned by this specification.
RThe immediate parent specification if this is a child specification.
RThe specification this kind was constructed from.
Try and find a specification common to both left and right.
Whether
othercan be assigned to a quantity specified by this.Attributes
- property dimensions: syside.BufferView[tuple[syside.experimental.units.BaseDimension, fractions.Fraction]]
Exact exponents of each nonzero dimension.
- property expression: syside.BufferView[tuple[syside.experimental.units.Specification, fractions.Fraction]]
The expression use to derive this quantity specification.
- property is_base: bool
Whether this specification is the root of its hierarchy, i.e. a named specification without a parent.
- property name: str | None
Name given to this quantity specification, e.g.
length,width.None if this was derived from an expression.
- property owned_expression: syside.BufferView[tuple[syside.experimental.units.Specification, fractions.Fraction]]
The expression owned by this specification.
May be empty if one is inherited, and not overridden.
- property parent: syside.experimental.units.Specification | None
The immediate parent specification if this is a child specification.
- property spec: syside.experimental.units.Specification
The specification this kind was constructed from.
Methods
- common_with(arg: syside.experimental.units.Specification, /) syside.experimental.units.Specification | None
Try and find a specification common to both left and right.
If kinds are different, none is returned.
- common_with(arg: syside.experimental.units.Kind, /) syside.experimental.units.Kind | None
Try to find a specification common with other.
If kinds are different, none is returned, otherwise this, i.e. common type is promoted from kind, rather than demoted to a common kind.
- convertible_from(arg: syside.experimental.units.Specification, /) syside.experimental.units.Convertible
- convertible_from(arg: syside.experimental.units.Kind, /) syside.experimental.units.Convertible
Whether
othercan be assigned to a quantity specified by this.