public class GraphTransformUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<SubGraph> |
getSubgraphsMatching(SameDiff sd,
SubGraphPredicate p)
Get a list of all the subgraphs that match the specified predicate
|
static SameDiff |
replaceSubgraphsMatching(@NonNull SameDiff sd,
@NonNull SubGraphPredicate p,
@NonNull SubGraphProcessor processor)
Find all of the subgraphs that match the specified SubGraphPredicate and then replace them with a different subgraph.
Note that the original SameDiff instance is not modified; a copy is made, which is then modified and returned. |
public static SameDiff replaceSubgraphsMatching(@NonNull @NonNull SameDiff sd, @NonNull @NonNull SubGraphPredicate p, @NonNull @NonNull SubGraphProcessor processor)
sd - SameDiff instance to copy and modifyp - SubGraphPredicate to define and select the subgraphs that should be modified or replacedprocessor - SubGraphProcessor is used to define how the subgraphs (selected by the SubGraphPredicate) should
be modified/replacedpublic static List<SubGraph> getSubgraphsMatching(SameDiff sd, SubGraphPredicate p)
sd - SameDiff instance to get the subgraphs forp - Subgraph predicate. This defines the subgraphs that should be selected in the SameDiff instanceCopyright © 2021. All rights reserved.