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

smatrix::svector_ref Class Template Reference

#include <Smatrix.hpp>

Inheritance diagram for smatrix::svector_ref::

smatrix::const_svector_ref List of all members.

Public Types

typedef map< size_t, size_t
>::iterator 
iterator

Public Methods

 svector_ref (smatrix< t > *pm, const rng &i, size_t j)
 svector_ref (smatrix< t > *pm, size_t i, const rng &j)
map< size_t, size_t > * GetMap ()
iterator lower_bound (size_t i)
t & Coef (iterator p)
svector_ref operator= (const const_svector_ref &b)
svector_ref & operator= (const svector &b)
iterator insert (iterator p, size_t x, const t &d)
iterator erase (iterator p)
t & operator() (size_t n)
void CalcEpsilon (const t &d)
svector_ref & operator+= (const const_svector_ref &b)
svector_ref & operator-= (const const_svector_ref &b)
svector_ref & operator+= (const svector &b)
svector_ref & operator-= (const svector &b)
svector_ref & operator *= (const t &d)

Static Public Methods

size_t Index (iterator p)

Public Attributes

smatrix< t > * m

template<class t>
class smatrix< t >::svector_ref


Member Typedef Documentation

template<class t>
typedef map<size_t, size_t>::iterator smatrix::svector_ref::iterator
 

Definition at line 434 of file Smatrix.hpp.


Constructor & Destructor Documentation

template<class t>
smatrix< t >::svector_ref::svector_ref smatrix< t > *    pm,
const rng   i,
size_t    j
[inline]
 

Definition at line 436 of file Smatrix.hpp.

00436                                                             :
00437             m(pm), const_svector_ref(pm, i, j) { }

template<class t>
smatrix< t >::svector_ref::svector_ref smatrix< t > *    pm,
size_t    i,
const rng   j
[inline]
 

Definition at line 438 of file Smatrix.hpp.

00438                                                             :
00439             m(pm), const_svector_ref(pm, i, j) { }


Member Function Documentation

template<class t>
void smatrix< t >::svector_ref::CalcEpsilon const t &    d [inline]
 

Definition at line 495 of file Smatrix.hpp.

00496         {
00497             sm::CalcEpsilon(m->maxCoef, m->epsilon, d);
00498         }

template<class t>
t& smatrix< t >::svector_ref::Coef iterator    p [inline]
 

Definition at line 453 of file Smatrix.hpp.

Referenced by operator *=().

00454         {
00455             return(m->e[p->second]);
00456         }

template<class t>
map<size_t, size_t>* smatrix< t >::svector_ref::GetMap   [inline]
 

Definition at line 440 of file Smatrix.hpp.

Referenced by lower_bound(), and operator()().

00441         {
00442             if(bColVect && n < m->jMap->size())
00443                 return((*m->jMap)[n]);
00444             if(!bColVect && n < m->iMap->size())
00445                 return((*m->iMap)[n]);
00446             return((*m->iMap)[0]);
00447         }

template<class t>
size_t smatrix< t >::svector_ref::Index iterator    p [inline, static]
 

Definition at line 452 of file Smatrix.hpp.

00452 { return(p->first); }

template<class t>
iterator smatrix< t >::svector_ref::erase iterator    p [inline]
 

Definition at line 478 of file Smatrix.hpp.

00479         {
00480             m->erase(p->second);
00481             if(bColVect)
00482             {
00483                 (*m->iMap)[p->first]->erase(n);
00484                 return((*m->jMap)[n]->erase(p));
00485             }
00486             (*m->jMap)[p->first]->erase(n);
00487             return((*m->iMap)[n]->erase(p));
00488         }

template<class t>
iterator smatrix< t >::svector_ref::insert iterator    p,
size_t    x,
const t &    d
[inline]
 

Definition at line 465 of file Smatrix.hpp.

Referenced by operator()().

00466         {
00467             iterator iIter, jIter;
00468             if(bColVect)
00469             {
00470                 iIter = p;
00471                 m->insert(x, n, d, iIter, iIter);
00472                 return(iIter);
00473             }
00474             jIter = p;
00475             m->insert(n, x, d, iIter, jIter);
00476             return(jIter);
00477         }

template<class t>
iterator smatrix< t >::svector_ref::lower_bound size_t    i [inline]
 

Definition at line 448 of file Smatrix.hpp.

Referenced by operator *=().

00449         {
00450             return(GetMap()->lower_bound(i));
00451         }

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

Definition at line 515 of file Smatrix.hpp.

00516         {
00517             iterator i = lower_bound(range.first);
00518             iterator iEnd = lower_bound(range.second + 1);
00519             for(; i != iEnd; i++) 
00520                 Coef(i) *= d;
00521             return(*this);
00522         }

template<class t>
t& smatrix< t >::svector_ref::operator() size_t    n [inline]
 

Definition at line 489 of file Smatrix.hpp.

00490         {
00491             const map<size_t, size_t> *Map = GetMap();
00492             const_iterator p = Map->find(n);
00493             return(p == Map->end() ? insert(n, t(0)) : cm->e[p->second]);
00494         }

template<class t>
svector_ref& smatrix< t >::svector_ref::operator+= const svector   b [inline]
 

Definition at line 507 of file Smatrix.hpp.

00508         {
00509             return(svAddEq(*this, b, false));
00510         }

template<class t>
svector_ref& smatrix< t >::svector_ref::operator+= const const_svector_ref   b [inline]
 

Definition at line 499 of file Smatrix.hpp.

00500         {
00501             return(svAddEq(*this, b, false));
00502         }

template<class t>
svector_ref& smatrix< t >::svector_ref::operator-= const svector   b [inline]
 

Definition at line 511 of file Smatrix.hpp.

00512         {
00513             return(svAddEq(*this, b, true));
00514         }

template<class t>
svector_ref& smatrix< t >::svector_ref::operator-= const const_svector_ref   b [inline]
 

Definition at line 503 of file Smatrix.hpp.

00504         {
00505             return(svAddEq(*this, b, true));
00506         }

template<class t>
svector_ref& smatrix< t >::svector_ref::operator= const svector   b [inline]
 

Definition at line 461 of file Smatrix.hpp.

00462         {
00463             return(svAssign(*this, b));
00464         }

template<class t>
svector_ref smatrix< t >::svector_ref::operator= const const_svector_ref   b [inline]
 

Definition at line 457 of file Smatrix.hpp.

00458         {
00459             return(svAssign(*this, b));
00460         }


Member Data Documentation

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

Definition at line 433 of file Smatrix.hpp.


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