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

📄 iterator.h

📁 高效的c++科学算法库
💻 H
字号:
/*                                                           -*- c++ -*- *********************************************************************** * Scientific Library (GNU Public Licence) * * module Sparse Symmetrix Skyline Matrix * * Author: Pierre Aubert paubert@mathinsa.insa-lyon.fr * * $Id: iterator.h,v 1.2 1998/11/16 17:22:13 paubert Exp $ * * Suggestions: sl@mathinsa.insa-lyon.fr * Bugs:   sl-bugs@mathinsa.insa-lyon.fr  * * For more information, please see the sl++ Home Page: * http://wwwinfo.cern.ch/~ldeniau/sl.html  * *********************************************************************** */#ifndef SL_MATRIX_STRUCTURES_SSS_ITERATOR_H#define SL_MATRIX_STRUCTURES_SSS_ITERATOR_H#ifndef SL_MATRIX_STRUCTURES_SSS_H#error <sl/matrix/structures/sss/iterator.h> must be included via <sl/matrix/structures/sss.h>#endif#ifdef HAVE_NAMESPACEnamespace sl {#endif      /** @memo Iterator for a sparse symmetric skyline matrix       */        class SymmetricSkylineIterator : public GeneralIterator    {    public:                    typedef SymmetricSkyline structure_t;                      /** @name Explanation              Sparse Symmetric Skyline Storage Iterator                            */          /**@name Constructor*/          //@{        SymmetricSkylineIterator(            structure_t const* structure,            Index       const i =MinIndex,            Index       const j =MinIndex )            : GeneralIterator(structure->rows(),structure->cols(),i,j,0),              my_haut(structure->haut()),              my_diag(structure->diag()),              my_last(my_diag(my_n)+my_haut(my_n)-1)            {                  // must be a square matrix                assert( structure->rows() == structure->cols() );                  // must be done after initialisation of diag and haut                my_o = map(i,j);                                }          //@}          /**@name Public member */          //@{          /// get to the next stored element in matrix (warning: storage is Column major)        void operator++();          /// get to the first stored element in next row        void incRow();          /// get to the first stored element in next column        void incCol();          //@}    private:          /**@name Private member */          //@{          /// get first in row        Index firstInRow() const;          /// get last in row        Index lastInRow() const;          /// get first in col        Index firstInCol() const;          /// get last in col        Index lastInCol() const;          /** map(i,j) find the position in the data array           */        Index map (Index const& i, Index const& j) const;          /** same as map(i,j) but without any control           */        inline Index map_fast (Index const& i, Index const& j) const;          //@}                  /**@name Private data */          //@{          /// const reference to table my\_haut        VectorUInt const& my_haut;          /// const reference to table my\_diag        VectorUInt const& my_diag;          /// number of stored elemenet in profil        Index const my_last;          //@}    };#ifdef HAVE_NAMESPACE}#endif#endif// end of SL_MATRIX_STRUCTURES_SSS_ITERATOR_H definition(s)// do not write anything after this line!

⌨️ 快捷键说明

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