Path: blob/devel/ElmerGUI/netgen/libsrc/general/spbita2d.hpp
3206 views
#ifndef FILE_SPBITA2D1#define FILE_SPBITA2D23/**************************************************************************/4/* File: spbita2d.hh */5/* Author: Joachim Schoeberl */6/* Date: 01. Jun. 95 */7/**************************************************************************/89/**10Implementation of sparse 2 dimensional bitarray11*/121314class SPARSE_BIT_ARRAY_2D15{16class linestruct { public: INDEX size; INDEX maxsize; INDEX * col; };1718///19linestruct * lines;20///21INDEX height, width;2223public:2425///26SPARSE_BIT_ARRAY_2D (INDEX ah = 0, INDEX aw = 0);27///28~SPARSE_BIT_ARRAY_2D ();2930///31void SetSize (INDEX ah, INDEX aw = 0);32///33void DeleteElements ();3435///36int Get (INDEX i, INDEX j) const;3738///39INDEX Height () const { return height; }40///41INDEX Width () const { return width; }4243///44void Set (INDEX i, INDEX j);45///46int Test (INDEX i, INDEX j) const;4748///49INDEX BitsInLine (INDEX i) const { return lines[i-1].size; }50///51INDEX GetIndex (INDEX i, INDEX nr) const { return lines[i-1].col[nr-1]; }52};535455#endif565758