Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

smatrix::vector_map Class Template Reference

#include <Smatrix.hpp>

Inheritance diagram for smatrix::vector_map::

vector List of all members.

Public Methods

vector_map & operator= (const vector_map &a)
 ~vector_map ()
void resize (size_t NewSize)

template<class t>
class smatrix< t >::vector_map


Constructor & Destructor Documentation

template<class t>
smatrix< t >::vector_map::~vector_map   [inline]
 

Definition at line 104 of file Smatrix.hpp.

00104 { for(iterator p = begin(); p != end(); p++) delete(*p); }


Member Function Documentation

template<class t>
vector_map& smatrix< t >::vector_map::operator= const vector_map &    a [inline]
 

Definition at line 96 of file Smatrix.hpp.

00097         {
00098             resize(a.size());
00099             const_iterator ap = a.begin();
00100             for(iterator p = begin(); p != end(); p++, ap++)
00101                 **p = **ap;
00102             return(*this);
00103         }

template<class t>
void smatrix< t >::vector_map::resize size_t    NewSize [inline]
 

Definition at line 105 of file Smatrix.hpp.

Referenced by operator=().

00106         {
00107             size_t OldSize = size();
00108             if(NewSize < OldSize)
00109             {
00110                 for(iterator p = begin(); p != &(*this)[OldSize]; p++)
00111                     delete(*p);
00112                 vector< map<size_t, size_t> *>::resize(NewSize);
00113             }
00114             else if(NewSize > OldSize)
00115             {
00116                 vector< map<size_t, size_t> *>::resize(NewSize, NULL);
00117                 for(iterator p = &(*this)[OldSize]; p != end(); p++)
00118                     *p = new map<size_t, size_t>;
00119             }
00120         }


The documentation for this class was generated from the following file:
Generated on Sun Oct 14 18:50:31 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001