meet_requirements

Applicable Products

All processors

Function Usage

Checks whether the match result meets the replacement condition. It is optional, and the default return value is True.

Prototype

1
meet_requirements(self, match_result: MatchResult) -> bool

Parameters

Parameter

Input/Output

Description

match_result

Input

Pattern match result, which is of the MatchResult type and contains the matched node and edge information.

Returns

If True is returned, the replacement requirement is met and the replacement will be performed. If False is returned, the replacement requirement is not met and the replacement will be skipped. The default value is True.

Restrictions

None