Vector Class Reference

#include <Propagation.h>

Inheritance diagram for Vector:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Vector ()
 ~Vector ()
void set_vec (double val)
void set_var (double val)
double get_vec (int id)
double get_var ()
int getsize_vec ()
void copyVector (std::vector< Vector > *vec1, std::vector< Vector > *vec2)
void printVector (std::vector< Vector > *vec1)
void set_x (double val)
void set_y (double val)
void set_z (double val)
void set_plane (int val)
double get_x (int id)
int getsize_x ()
double get_y (int id)
int getsize_y ()
double get_z (int id)
int getsize_z ()
int get_plane ()
void resetVec ()
std::vector< double > getVec ()

Private Attributes

double _var
int _plane
std::vector< double > _vec
std::vector< double > _vecX
std::vector< double > _vecY
std::vector< double > _vecZ

Detailed Description

Definition at line 15 of file Propagation.h.


Constructor & Destructor Documentation

Vector::Vector (  ) 

Definition at line 7 of file Propagation.cxx.

References _plane, and _var.

Referenced by copyVector(), AutoControlPoints::fixBetweenControl(), AutoControlPoints::GetIntersectionPoints(), AutoControlPoints::InterBetweenContours(), and AutoControlPoints::InterBetweenControl().

00008 {
00009         _plane = -1;
00010         _var = -1;
00011 }

Here is the caller graph for this function:

Vector::~Vector (  ) 

Definition at line 13 of file Propagation.cxx.

References _vec, _vecX, _vecY, and _vecZ.

00014 {
00015         _vec.clear();
00016         _vecX.clear();
00017         _vecY.clear();
00018         _vecZ.clear();
00019 }


Member Function Documentation

void Vector::copyVector ( std::vector< Vector > *  vec1,
std::vector< Vector > *  vec2 
)

Definition at line 51 of file Propagation.cxx.

References get_var(), get_vec(), set_var(), set_vec(), and Vector().

00052 {
00053         int i,j;
00054         if( vec1->size() != 0 )
00055         {
00056                 vec2->clear();
00057                 for(i=0; i<(int)(vec1->size()); i++)
00058                 {
00059                         Vector *temp = new Vector();
00060                         temp->set_var( (*vec1)[i].get_var() );
00061                         for(j=0; j<(*vec1)[i].getsize_vec(); j++)
00062                         {
00063                                 temp->set_vec( (*vec1)[i].get_vec(j) );
00064                         }
00065                         vec2->push_back(*temp);
00066                         delete temp;
00067                 }
00068         }
00069 }

Here is the call graph for this function:

int Vector::get_plane (  ) 

Definition at line 106 of file Propagation.cxx.

References _plane.

00107 {
00108         return _plane;
00109 }

double Vector::get_var (  ) 
double Vector::get_vec ( int  id  ) 

Definition at line 32 of file Propagation.cxx.

References _vec.

Referenced by copyVector(), AutoControlPoints::IntersectionPoints(), AutoControlPoints::PossibleIntersections(), and printVector().

00033 {
00034         if(_vec.size() != 0)
00035         {
00036                 return _vec[id];
00037         }
00038         return -1;
00039 }

Here is the caller graph for this function:

double Vector::get_x ( int  id  ) 

Definition at line 111 of file Propagation.cxx.

References _vecX.

00112 {
00113         if( (-1<id) && (id<(int)(_vecX.size())  ) )
00114         {
00115                 return _vecX[id];
00116         }
00117         return -1;
00118 }

double Vector::get_y ( int  id  ) 

Definition at line 129 of file Propagation.cxx.

References _vecY.

00130 {
00131         if( (-1<id) && (id<(int)(_vecY.size())) )
00132         {
00133                 return _vecY[id];
00134         }
00135         return -1;
00136 }

double Vector::get_z ( int  id  ) 

Definition at line 156 of file Propagation.cxx.

References _vecZ.

00157 {
00158         if( (-1<id) && (id<(int)(_vecZ.size())) )
00159         {
00160                 return _vecZ[id];
00161         }
00162         return -1;
00163 }

int Vector::getsize_vec (  ) 

Definition at line 46 of file Propagation.cxx.

References _vec.

Referenced by AutoControlPoints::PossibleIntersections().

00047 {
00048         return _vec.size();
00049 }

Here is the caller graph for this function:

int Vector::getsize_x (  ) 

Definition at line 120 of file Propagation.cxx.

References _vecX.

00121 {
00122         if(_vecX.size() != 0)
00123         {
00124                 return _vecX.size();
00125         }
00126         return -1;
00127 }

int Vector::getsize_y (  ) 

Definition at line 138 of file Propagation.cxx.

References _vecY.

00139 {
00140         if(_vecY.size() != 0)
00141         {
00142                 return _vecY.size();
00143         }
00144         return -1;
00145 }

int Vector::getsize_z (  ) 

Definition at line 147 of file Propagation.cxx.

References _vecZ.

00148 {
00149         if(_vecZ.size() != 0)
00150         {
00151                 return _vecZ.size();
00152         }
00153         return -1;
00154 }

std::vector< double > Vector::getVec (  ) 

Definition at line 165 of file Propagation.cxx.

References _vec.

00166 {
00167         return _vec;
00168 }

void Vector::printVector ( std::vector< Vector > *  vec1  ) 

Definition at line 71 of file Propagation.cxx.

References get_var(), and get_vec().

00072 {
00073         int i,j;
00074         for(i=0; i<(int)(vec1->size()); i++)
00075         {
00076                 printf("\n Pos (%d) => var = %f",i,(*vec1)[i].get_var());
00077                 for(j=0; j<(*vec1)[i].getsize_vec(); j++)
00078                 {
00079                         printf("\n vec(%d) = %f",j,(*vec1)[i].get_vec(j));
00080                 }
00081         }
00082 }

Here is the call graph for this function:

void Vector::resetVec (  ) 

Definition at line 170 of file Propagation.cxx.

References _vec.

00171 {
00172         _vec.clear();
00173 }

void Vector::set_plane ( int  val  ) 

Definition at line 84 of file Propagation.cxx.

References _plane.

Referenced by PropContour::GetPropagatedContours().

00085 {
00086         _plane = val;
00087 }

Here is the caller graph for this function:

void Vector::set_var ( double  val  ) 

Definition at line 27 of file Propagation.cxx.

References _var.

Referenced by copyVector(), AutoControlPoints::fixBetweenControl(), AutoControlPoints::GetIntersectionPoints(), AutoControlPoints::InterBetweenContours(), and AutoControlPoints::InterBetweenControl().

00028 {
00029         _var = val;
00030 }

Here is the caller graph for this function:

void Vector::set_vec ( double  val  ) 

Definition at line 22 of file Propagation.cxx.

References _vec.

Referenced by copyVector(), AutoControlPoints::fixBetweenControl(), AutoControlPoints::GetIntersectionPoints(), AutoControlPoints::InterBetweenContours(), and AutoControlPoints::InterBetweenControl().

00023 {
00024         _vec.push_back(val);
00025 }

Here is the caller graph for this function:

void Vector::set_x ( double  val  ) 

Definition at line 89 of file Propagation.cxx.

References _vecX.

Referenced by PropContour::GetPropagatedContours().

00090 {
00091         _vecX.push_back(val);
00092 }

Here is the caller graph for this function:

void Vector::set_y ( double  val  ) 

Definition at line 95 of file Propagation.cxx.

References _vecY.

Referenced by PropContour::GetPropagatedContours().

00096 {
00097         _vecY.push_back(val);
00098 }

Here is the caller graph for this function:

void Vector::set_z ( double  val  ) 

Definition at line 101 of file Propagation.cxx.

References _vecZ.

Referenced by PropContour::GetPropagatedContours().

00102 {
00103         _vecZ.push_back(val);
00104 }

Here is the caller graph for this function:


Member Data Documentation

int Vector::_plane [private]

Definition at line 43 of file Propagation.h.

Referenced by get_plane(), set_plane(), and Vector().

double Vector::_var [private]

Definition at line 42 of file Propagation.h.

Referenced by get_var(), set_var(), and Vector().

std::vector<double> Vector::_vec [private]

Definition at line 44 of file Propagation.h.

Referenced by get_vec(), getsize_vec(), getVec(), resetVec(), set_vec(), and ~Vector().

std::vector<double> Vector::_vecX [private]

Definition at line 45 of file Propagation.h.

Referenced by get_x(), getsize_x(), set_x(), and ~Vector().

std::vector<double> Vector::_vecY [private]

Definition at line 46 of file Propagation.h.

Referenced by get_y(), getsize_y(), set_y(), and ~Vector().

std::vector<double> Vector::_vecZ [private]

Definition at line 47 of file Propagation.h.

Referenced by get_z(), getsize_z(), set_z(), and ~Vector().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1