1 See https://github.com/tscrim/coxeter/pull/14
3 commit 7b46d5ea88cfdcaa4af549f61c58c330fb513948
4 Author: Jeroen Demeyer <jdemeyer@cage.ugent.be>
5 Date: Mon Feb 26 14:43:08 2018 +0100
9 diff --git a/sage.cpp b/sage.cpp
11 index 0000000..74f86be
16 + Coxeter version 3.0 Copyright (C) 2009 Mike Hansen
17 + See file main.cpp for full copyright notice
24 + void interval(List<CoxWord>& list, CoxGroup& W, const CoxWord& g, const CoxWord& h)
27 + Returns a list of the elements in the Bruhat interval between g and h.
28 + Note that this assumes that g and h are in order.
31 + if (not W.inOrder(g,h)) {
37 + CoxNbr x = W.contextNumber(g);
38 + CoxNbr y = W.contextNumber(h);
40 + BitMap b(W.contextSize());
41 + W.extractClosure(b,y);
43 + BitMap::ReverseIterator b_rend = b.rend();
44 + List<CoxNbr> res(0);
46 + for (BitMap::ReverseIterator i = b.rbegin(); i != b_rend; ++i)
47 + if (not W.inOrder(x,*i)) {
48 + BitMap bi(W.contextSize());
49 + W.extractClosure(bi,*i);
50 + CoxNbr z = *i; // andnot will invalidate iterator
52 + b.setBit(z); // otherwise the decrement will not be correct
56 + schubert::NFCompare nfc(W.schubert(),W.ordering());
57 + Permutation a(res.size());
61 + for (size_t j = 0; j < res.size(); ++j) {
63 + W.schubert().append(w, res[a[j]]);
71 diff --git a/sage.h b/sage.h
73 index 0000000..5b3df8a
78 + Coxeter version 3.0 Copyright (C) 2009 Mike Hansen
79 + See file main.cpp for full copyright notice
82 +#ifndef SAGE_H /* guard against multiple inclusions */
86 +#include "coxgroup.h"
87 +#include "coxtypes.h"
88 +#include "schubert.h"
92 + using namespace coxeter;
93 + using namespace coxtypes;
94 + using namespace list;
96 + void interval(List<CoxWord>& result, CoxGroup& W, const CoxWord& g, const CoxWord& h);