548{
549 std::vector<int>
monom1 {1, 0, 1, 2};
550 std::vector<int>
monom2 {1, 0, 2, 2};
551 std::vector<int>
monom3 {1, 0, 1, 0};
552 std::vector<int> monom4 {1, 0};
553 std::vector<int>
word {1, 0, 1, 0, 2, 2, 1, 0, 1, 2};
554
556
557 EXPECT_EQ(
monom1.size(), 4);
558 EXPECT_EQ(
monom2.size(), 4);
559 EXPECT_EQ(
monom3.size(), 4);
560 EXPECT_EQ(monom4.size(), 2);
561 EXPECT_EQ(
word.size(), 10);
562
567
568 std::vector<std::pair<int,int>> matches;
570
571 EXPECT_EQ(matches.size(), 6);
572 EXPECT_EQ(matches[0], std::make_pair(0, 6));
573 EXPECT_EQ(matches[1], std::make_pair(1, 2));
574 EXPECT_EQ(matches[2], std::make_pair(2, 0));
575 EXPECT_EQ(matches[3], std::make_pair(3, 0));
576 EXPECT_EQ(matches[4], std::make_pair(3, 2));
577 EXPECT_EQ(matches[5], std::make_pair(3, 6));
578}
std::vector< int > monom1
std::vector< int > monom2
std::vector< int > monom3
Non-owning view of a non-commutative word: [begin, end) of int variable indices.
void subwords(Word word, std::vector< std::pair< int, int > > &output) const
Index of Words (non-commutative monomials) with subword, prefix/suffix, and overlap lookup used by th...