⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subsetdebruijn.h

📁 the FXT library: fast transforms and low level algorithms. The package contains many algorithms for
💻 H
字号:
#if !defined  HAVE_SUBSETDEBRUIJN_H__#define       HAVE_SUBSETDEBRUIJN_H__#include "binarydebruijn.h"class subset_debruijn : public binary_debruijn{public:    subset_debruijn(ulong nn)        : binary_debruijn(nn)    {        x = NEWOP(ulong, nmax_);        init();    }    ~subset_debruijn()  { delete [] x;}    void init()    {        binary_debruijn::init();        for (ulong k=0; k<n_; ++k)  binary_debruijn::next();        sync_x();    }    ulong next()  // return number of elements in subset    {        binary_debruijn::next();        sync_x();        return  word_;    }    const ulong * data()  { return x; }protected:    void sync_x()    {        for (ulong j=0, m=1;  j<n_;  ++j, m<<=1)        {            x[j] = (word_ & m ? 1 : 0);        }    }protected:    ulong *x;};// -------------------------#endif  // !defined HAVE_SUBSETDEBRUIJN_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -