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

smatrix::coefRef Class Template Reference

#include <Smatrix.hpp>

List of all members.

Public Methods

 coefRef (smatrix< t > *m, size_t i, size_t j)
coefRef & operator= (const t &d)
 operator t () const

Public Attributes

smatrix< t > * m
size_t i
size_t j

template<class t>
class smatrix< t >::coefRef


Constructor & Destructor Documentation

template<class t>
smatrix< t >::coefRef::coefRef smatrix< t > *    m,
size_t    i,
size_t    j
[inline]
 

Definition at line 539 of file Smatrix.hpp.

00540         {
00541             this->m = m;
00542             this->i = i;
00543             this->j = j;
00544         }


Member Function Documentation

template<class t>
smatrix< t >::coefRef::operator t   const [inline]
 

Definition at line 568 of file Smatrix.hpp.

00569         {
00570             if(i > m->iDim || j > m->jDim) return(0);
00571             const map<size_t, size_t> *r = (*m->iMap)[i];
00572             map<size_t, size_t>::const_iterator p = r->find(j);
00573             if(p == r->end())
00574                 return(0);
00575             return(m->e[p->second]);
00576         }

template<class t>
coefRef& smatrix< t >::coefRef::operator= const t &    d [inline]
 

Definition at line 545 of file Smatrix.hpp.

00546         {
00547             if(abs(d) > m->epsilon)
00548             {
00549                 if(i > m->iDim || j > m->jDim)
00550                     m->insert(i, j, d);
00551                 else
00552                 {
00553                     const map<size_t, size_t> *r = (*m->iMap)[i];
00554                     map<size_t, size_t>::const_iterator p = r->find(j);
00555                     if(p == r->end())
00556                         m->insert(i, j, d);
00557                     else
00558                     {
00559                         m->e[p->second] = d;
00560                         CalcEpsilon(m->maxCoef, m->epsilon, d);
00561                     }
00562                 }
00563             }
00564             else if(i <= m->iDim && j <= m->jDim)
00565                 m->erase(i, j);
00566             return(*this);
00567         }


Member Data Documentation

template<class t>
size_t smatrix::coefRef::i
 

Definition at line 537 of file Smatrix.hpp.

template<class t>
size_t smatrix::coefRef::j
 

Definition at line 537 of file Smatrix.hpp.

template<class t>
smatrix<t>* smatrix::coefRef::m
 

Definition at line 536 of file Smatrix.hpp.


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