Equation Angle
- class AngleEquation(**data)
Bases:
PredicateInterface
aequation a A b B c C … k - Represents the linear equation a * A + b * B + c * C + … = k. The coefficients (small letters) are signed rational numbers,the capitalized letters are 4-tuples of points representing angles, k is an integer.
The syntax of k is either a fraction of pi like 2pi/3 for radians or a number followed by a ‘o’ like 120o for degree.
This generates an equation that can be added to the deductor for reasoning (AR for example).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- predicate_type: Literal[PredicateType.ANGLE_EQUATION]
- coefficients: list[Fraction]
- angles: list[tuple[str, ...]]
- constant: Fraction
- static preparse(args)
Preparse the predicate arguments.
- Return type:
tuple
[NewType
(PredicateArgument
,str
),...
] |None
- classmethod parse(args, symbols)
- Return type:
Optional
[tuple
[Any
,...
]]
- check_numerical()
Check numerically the predicate.
- Return type:
bool
- to_tokens()
Convert the predicate to a tuple of strings.
- Return type:
tuple
[NewType
(PredicateArgument
,str
),...
]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].