diff --git a/include/aidge/graph/Matching.hpp b/include/aidge/graph/Matching.hpp index 4d1a920f0fff542f88459bd0fa8db9415a73af32..31bae71e9b433d1b82ffe62d93837f440c8a936f 100644 --- a/include/aidge/graph/Matching.hpp +++ b/include/aidge/graph/Matching.hpp @@ -78,18 +78,26 @@ public: * * Some rules: * - The first node of the first sequence is the root node and cannot be optional - * WRONG: Conv?->ReLU (will throws an error) + * WRONG: Conv?->ReLU (will throw an error) * GOOD: ReLU<-Conv? * * - The first node of any further sequence must be an existing anchor * (the anchor cannot be in the middle of the sequence) - * WRONG: Conv->ReLU;Pad->Conv (will throws an error) - * Pad->Conv;Conv->ReLU (will throws an error) + * WRONG: Conv->ReLU;Pad->Conv (will throw an error) + * Pad->Conv;Conv->ReLU (will throw an error) * GOOD: Conv#->ReLU;Conv#<-Pad * Pad->Conv#;Conv#->ReLU * * - Any node already matched cannot be matched again (except for anchors) * + * - By default, an edge matches the first output to the first input. + * EXAMPLE: ReLU->Conv is equivalent to ReLU-0-0>Conv + * To match the second input, use ReLU-0-1>Conv (or ReLU-1>Conv) + * To match the second output, use ReLU-1-0>Conv + * To match any input and/or any output, use *, like ReLU-1-*>Conv + * or ReLU-*-0>Conv or ReLU-*-*>Conv + * The same is true for the "<-" edge syntax. + * * - When several nodes could match for a given node query, the first one * not already in the matching result is matched, following the * childs/parents ordered node list