Lines Matching refs:SNodeId

473 struct SNodeId {  struct
476 explicit SNodeId(int Id) : Id(Id) {} in SNodeId() argument
477 explicit SNodeId() = default;
480 SNodeId &operator++() { return ++Id, *this; } in operator ++() argument
481 SNodeId &operator--() { return --Id, *this; } in operator --() argument
482 SNodeId operator+(int Other) const { return SNodeId(Id + Other); } in operator +() argument
492 std::vector<SNodeId> LeftMostDescendants;
495 std::vector<SNodeId> KeyRoots;
503 NodeId getIdInRoot(SNodeId Id) const { in getIdInRoot()
507 const Node &getNode(SNodeId Id) const { in getNode()
510 SNodeId getLeftMostDescendant(SNodeId Id) const { in getLeftMostDescendant()
516 return Tree.PostorderIds[getIdInRoot(SNodeId(1))]; in getPostorderOffset()
518 std::string getNodeValue(SNodeId Id) const { in getNodeValue()
528 SNodeId SI(I + 1); in setLeftMostDescendants()
534 LeftMostDescendants[I] = SNodeId(Tree.PostorderIds[N.LeftMostDescendant] - in setLeftMostDescendants()
543 for (SNodeId I(getSize()); I > 0; --I) { in computeKeyRoots()
544 SNodeId LeftDesc = getLeftMostDescendant(I); in computeKeyRoots()
580 std::vector<std::pair<SNodeId, SNodeId>> TreePairs; in getMatchingNodes()
586 TreePairs.emplace_back(SNodeId(S1.getSize()), SNodeId(S2.getSize())); in getMatchingNodes()
589 SNodeId LastRow, LastCol, FirstRow, FirstCol, Row, Col; in getMatchingNodes()
613 SNodeId LMD1 = S1.getLeftMostDescendant(Row); in getMatchingNodes()
614 SNodeId LMD2 = S2.getLeftMostDescendant(Col); in getMatchingNodes()
644 double getUpdateCost(SNodeId Id1, SNodeId Id2) { in getUpdateCost()
651 for (SNodeId Id1 : S1.KeyRoots) in computeTreeDist()
652 for (SNodeId Id2 : S2.KeyRoots) in computeTreeDist()
656 void computeForestDist(SNodeId Id1, SNodeId Id2) { in computeForestDist()
658 SNodeId LMD1 = S1.getLeftMostDescendant(Id1); in computeForestDist()
659 SNodeId LMD2 = S2.getLeftMostDescendant(Id2); in computeForestDist()
662 for (SNodeId D1 = LMD1 + 1; D1 <= Id1; ++D1) { in computeForestDist()
664 for (SNodeId D2 = LMD2 + 1; D2 <= Id2; ++D2) { in computeForestDist()
666 SNodeId DLMD1 = S1.getLeftMostDescendant(D1); in computeForestDist()
667 SNodeId DLMD2 = S2.getLeftMostDescendant(D2); in computeForestDist()