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

Public Member Functions

 Acreal (long=0)
 
 Acreal (const Acreal &)
 
void destroy ()
 
crealoperator[] (long i)
 
crealoperator& ()
 
void init (long newSize)
 

Public Attributes

long szz
 
crealcc
 

Constructor & Destructor Documentation

◆ Acreal() [1/2]

fem::Acreal::Acreal ( long  sz = 0)
178{
179 cc = 0;
180 if (sz > 0)
181 {
182 cc = new creal[sz];
183 if (!cc)
184 erreur ("Out of Memory");
185 }
186 for (int i = 0; i < sz; i++)
187 cc[i] = 0;
188 szz = sz;
189}

◆ Acreal() [2/2]

fem::Acreal::Acreal ( const Acreal a)
191{
192 cc = 0;
193 if (a.szz > 0)
194 {
195 szz = a.szz;
196 cc = new creal[szz];
197 if (!cc)
198 erreur ("Out of Memory");
199 else
200 for (int i = 0; i < szz; i++)
201 cc[i] = a.cc[i];
202 }
203 else
204 {
205 cc = NULL;
206 szz = 0;
207 }
208}

◆ ~Acreal()

fem::Acreal::~Acreal ( )
inline
317{ delete [] cc;cc=0;szz = 0;}

Member Function Documentation

◆ destroy()

void fem::Acreal::destroy ( )
inline
318{delete [] cc;cc=0;szz = 0;}

◆ init()

void fem::Acreal::init ( long  newSize)
168{
169 myassert (!(szz || cc));
170 szz = newSize;
171 cc = new creal[szz];
172 if (!cc)
173 erreur ("Out of Memory");
174 for (int i = 0; i < szz; i++)
175 cc[i] = 0;
176}

◆ operator&()

creal * fem::Acreal::operator& ( )
inline
320{ return cc;}

◆ operator[]()

creal & fem::Acreal::operator[] ( long  i)
inline
319{ /*myassert((i< szz)&&(i>=0));*/ return cc[i];}

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

This is the FreeFEM reference manual
Provided by The KFEM project