Vector Class Reference

#include <vector.h>

List of all members.

Public Member Functions

double * GetVector ()
 return a contiguous zone of memory where values are stored
double & operator() (int i)
 return value indexed by i
int PrintToFile (FILE *f, int step=0)
 print vetor to file specified by FILE * pointer
int PrintToFile (char *f, int step=0)
 print vetor to file specified by name
void Scale (double a)
 scale vector by value a
 Vector (int t)
int zero ()
 set vector to zero
 ~Vector ()

Protected Attributes

int taille
 size of vector
double * vector
 array of doubles storing the values


Detailed Description

Definition at line 52 of file vector.h.


Constructor & Destructor Documentation

Vector::Vector ( int  t  )  [inline]

Definition at line 56 of file vector.h.

References taille, and vector.

00056                {
00057     taille = t;
00058     vector = new double[t];
00059   };

Vector::~Vector (  )  [inline]

Definition at line 61 of file vector.h.

00061 {};


Member Function Documentation

double* Vector::GetVector (  )  [inline]

return a contiguous zone of memory where values are stored

Definition at line 89 of file vector.h.

References vector.

Referenced by FullMatrix::Solve(), and BandeMatrix::Solve().

00089                       {
00090     return vector;
00091   };

double& Vector::operator() ( int  i  )  [inline]

return value indexed by i

Definition at line 64 of file vector.h.

References vector.

00064                            {
00065     return vector[i];
00066   };

int Vector::PrintToFile ( FILE *  f,
int  step = 0 
) [inline]

print vetor to file specified by FILE * pointer

Definition at line 78 of file vector.h.

References taille, and vector.

00078                                       {
00079     
00080     for (int i=0;i< taille;++i)
00081       {
00082         fprintf(f,"%d\t%d\t%.15e\n",i,step,vector[i]);
00083       }
00084     
00085     return 0; 
00086   };

int Vector::PrintToFile ( char *  f,
int  step = 0 
) [inline]

print vetor to file specified by name

Definition at line 69 of file vector.h.

References file.

00069                                       {
00070     FILE * file = fopen(f,"wb+");
00071     PrintToFile(file,step);
00072     fclose(file);
00073 
00074     return 0;
00075   }

void Vector::Scale ( double  a  )  [inline]

scale vector by value a

Definition at line 100 of file vector.h.

References ScaleVector(), taille, and vector.

00100                       {
00101     ScaleVector(vector,taille,a);
00102   }

Here is the call graph for this function:

int Vector::zero (  )  [inline]

set vector to zero

Definition at line 94 of file vector.h.

References taille, and vector.

Referenced by AverageOperator::AverageOperator(), FormeFaible< DomainA, DomainC, Dim >::BuildContinuRHS(), LeastSquare< DomainA, DomainC, Dim >::BuildLeastSquareRHS(), MyMethodFull< DomainA, DomainC, Dim >::BuildRHS(), AverageOperator::computeAverage(), MyMethodFull< DomainA, DomainC, Dim >::Init(), LeastSquare< DomainA, DomainC, Dim >::Init(), FormeFaible< DomainA, DomainC, Dim >::Init(), and BelytschkoFull< DomainA, DomainC, Dim >::Init().

00094             {
00095     memset(vector,0,taille*sizeof(double)); // mise a zero  
00096     return 0;
00097   }


Member Data Documentation

int Vector::taille [protected]

size of vector

Definition at line 107 of file vector.h.

Referenced by PrintToFile(), Scale(), Vector(), and zero().

double* Vector::vector [protected]

array of doubles storing the values

Definition at line 109 of file vector.h.

Referenced by GetVector(), operator()(), PrintToFile(), Scale(), Vector(), and zero().


The documentation for this class was generated from the following file:
Generated on Fri Sep 7 13:13:30 2007 for LibMultiScale by  doxygen 1.5.2