FreeFem 3.5.x
Public Member Functions | Public Attributes | Friends | List of all members
fem::cvect Class Reference

Public Member Functions

 cvect (const cvect &r)
 
 cvect (ccreal r)
 cvect( cvect& r) { val[0]=r.val[0];val[1]=r.val[1];} // copy constructor More...
 
ccreal & operator[] (int i)
 
const ccreal & operator[] (int i) const
 
float modul2 ()
 
ccreal operator*= (const cvect &a)
 
cvectoperator*= (const ccreal a)
 
cvectoperator/= (const ccreal a)
 
cvectoperator+= (const cvect &a)
 
cvectoperator+= (const ccreal a)
 
cvectoperator-= (const cvect &a)
 
cvectoperator-= (const ccreal a)
 
cvectoperator= (const cvect &a)
 
cvectoperator= (const ccreal a)
 
cvectoperator- ()
 

Public Attributes

ccreal val [2]
 

Friends

ccreal operator* (const cvect &a, const cvect &b)
 
cvect operator* (const cvect &a, const ccreal b)
 
cvect operator* (const ccreal b, const cvect &a)
 
cvect operator/ (const cvect &a, const ccreal b)
 
cvect operator+ (const cvect &a, const cvect &b)
 
cvect operator+ (const cvect &a, const ccreal b)
 
cvect operator+ (const ccreal b, const cvect &a)
 
cvect operator- (const cvect &a, const cvect &b)
 
cvect operator- (const cvect &a, const ccreal b)
 
cvect operator- (const ccreal b, const cvect &a)
 
float norm2 (cvect &a)
 
float realpart (const cvect &a)
 
std::ostream & operator<< (std::ostream &os, cvect &a)
 
std::istream & operator>> (std::istream &os, cvect &a)
 

Constructor & Destructor Documentation

◆ cvect() [1/3]

fem::cvect::cvect ( )
inline
177{ val[0]=0.F; val[1]=0.F; } // constructor

◆ cvect() [2/3]

fem::cvect::cvect ( const cvect r)
inline
178{ val[0]=r.val[0];val[1]=r.val[1];} // copy constructor

◆ cvect() [3/3]

fem::cvect::cvect ( ccreal  r)
inline

cvect( cvect& r) { val[0]=r.val[0];val[1]=r.val[1];} // copy constructor

180{ val[0]=r;val[1]=r;} // copy constructor from a creal

Member Function Documentation

◆ modul2()

float fem::cvect::modul2 ( )
inline
183{ return norm2(val[0])+norm2(val[1]);} // public fnct

◆ operator*=() [1/2]

cvect & fem::cvect::operator*= ( const ccreal  a)
inline
185{ val[0] *= a; val[1] *= a; return *this; }

◆ operator*=() [2/2]

ccreal fem::cvect::operator*= ( const cvect a)
inline
184{ return val[0]*a.val[0] + val[1]*a.val[1]; }

◆ operator+=() [1/2]

cvect & fem::cvect::operator+= ( const ccreal  a)
inline
192{ val[0] += a;val[1] += a; return *this; }

◆ operator+=() [2/2]

cvect & fem::cvect::operator+= ( const cvect a)
inline
191{ val[0] += a.val[0];val[1] += a.val[1]; return *this; }

◆ operator-()

cvect & fem::cvect::operator- ( )
inline
203{ val[0] = -val[0]; val[1] = -val[1]; return *this; }

◆ operator-=() [1/2]

cvect & fem::cvect::operator-= ( const ccreal  a)
inline
197{ val[0] -= a;val[1] -= a; return *this; }

◆ operator-=() [2/2]

cvect & fem::cvect::operator-= ( const cvect a)
inline
196{ val[0] -= a.val[0];val[1] -= a.val[1]; return *this; }

◆ operator/=()

cvect & fem::cvect::operator/= ( const ccreal  a)
inline
189{val[0] /= a;val[1] /= a; return *this; }

◆ operator=() [1/2]

cvect & fem::cvect::operator= ( const ccreal  a)
inline
202{val[0] = a; val[1] = a; return *this; }

◆ operator=() [2/2]

cvect & fem::cvect::operator= ( const cvect a)
inline
201{ val[0] = a.val[0];val[1] = a.val[1]; return *this; }

◆ operator[]() [1/2]

ccreal & fem::cvect::operator[] ( int  i)
inline
181{ /*myassert((i< 2)&&(i>=0)); */ return val[i];}

◆ operator[]() [2/2]

const ccreal & fem::cvect::operator[] ( int  i) const
inline
182{ /*myassert((i< 2)&&(i>=0));*/ return val[i];}

Friends And Related Function Documentation

◆ norm2

float norm2 ( cvect a)
friend
204{ return a.modul2();}

◆ operator* [1/3]

cvect operator* ( const ccreal  b,
const cvect a 
)
friend
188{ cvect c(a); return c *= b; }

◆ operator* [2/3]

cvect operator* ( const cvect a,
const ccreal  b 
)
friend
187{ cvect c(a); return c *= b; }

◆ operator* [3/3]

ccreal operator* ( const cvect a,
const cvect b 
)
friend
186{ cvect c(a); return c *= b; }

◆ operator+ [1/3]

cvect operator+ ( const ccreal  b,
const cvect a 
)
friend
195{ cvect c(a); return c += b; }

◆ operator+ [2/3]

cvect operator+ ( const cvect a,
const ccreal  b 
)
friend
194{ cvect c(a); return c += b; }

◆ operator+ [3/3]

cvect operator+ ( const cvect a,
const cvect b 
)
friend
193{ cvect c(a); return c += b; }

◆ operator- [1/3]

cvect operator- ( const ccreal  b,
const cvect a 
)
friend
200{ cvect c(b); return c -= a; }

◆ operator- [2/3]

cvect operator- ( const cvect a,
const ccreal  b 
)
friend
199{ cvect c(a); return c -= b; }

◆ operator- [3/3]

cvect operator- ( const cvect a,
const cvect b 
)
friend
198{ cvect c(a); return c -= b; }

◆ operator/

cvect operator/ ( const cvect a,
const ccreal  b 
)
friend
190{ cvect c(a); return c /= b; }

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
cvect a 
)
friend
85{
86 for (int i = 0; i < N; i++)
87 os << a[i] << " ";
88 return os;
89}

◆ realpart

float realpart ( const cvect a)
friend
205{ return realpart(a.val[0]); }

The documentation for this class was generated from the following file:

This is the FreeFEM reference manual
Provided by The KFEM project