#include <Propagation.h>
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 |
Definition at line 15 of file Propagation.h.
Vector::Vector | ( | ) |
Definition at line 7 of file Propagation.cxx.
Referenced by copyVector(), AutoControlPoints::fixBetweenControl(), AutoControlPoints::GetIntersectionPoints(), AutoControlPoints::InterBetweenContours(), and AutoControlPoints::InterBetweenControl().
Vector::~Vector | ( | ) |
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 }
int Vector::get_plane | ( | ) |
Definition at line 106 of file Propagation.cxx.
References _plane.
00107 { 00108 return _plane; 00109 }
double Vector::get_var | ( | ) |
Definition at line 41 of file Propagation.cxx.
References _var.
Referenced by AutoControlPoints::AddControlPoint(), copyVector(), AutoControlPoints::ErrorBetweenContours(), AutoControlPoints::fixBetweenControl(), AutoControlPoints::IntersectionPoints(), AutoControlPoints::PossibleIntersections(), and printVector().
00042 { 00043 return _var; 00044 }
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().
double Vector::get_x | ( | int | id | ) |
Definition at line 111 of file Propagation.cxx.
References _vecX.
double Vector::get_y | ( | int | id | ) |
Definition at line 129 of file Propagation.cxx.
References _vecY.
double Vector::get_z | ( | int | id | ) |
Definition at line 156 of file Propagation.cxx.
References _vecZ.
int Vector::getsize_vec | ( | ) |
Definition at line 46 of file Propagation.cxx.
References _vec.
Referenced by AutoControlPoints::PossibleIntersections().
00047 { 00048 return _vec.size(); 00049 }
int Vector::getsize_x | ( | ) |
Definition at line 120 of file Propagation.cxx.
References _vecX.
int Vector::getsize_y | ( | ) |
Definition at line 138 of file Propagation.cxx.
References _vecY.
int Vector::getsize_z | ( | ) |
Definition at line 147 of file Propagation.cxx.
References _vecZ.
std::vector< double > Vector::getVec | ( | ) |
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 }
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 }
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 }
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 }
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 }
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 }
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 }
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.
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().