#include <Ptv.h>
List of all members.
Public Member Functions |
| Ptv (unsigned int size_) |
| Ptv (unsigned int size_, double *v_) |
| Ptv (double x, double y) |
| Ptv (double x, double y, double z) |
| Ptv (const Ptv &p) |
| Ptv () |
void | redim (unsigned int size_, double *v_) |
void | redim (unsigned int size_) |
void | fill (double *v_) |
virtual | ~Ptv () |
const unsigned int | size () const |
const double & | operator[] (unsigned int i) const |
double & | operator[] (unsigned int i) |
Ptv & | operator= (const Ptv &p) |
bool | less (const Ptv &p) const |
Public Attributes |
unsigned int | dim |
double * | v |
Static Public Attributes |
static double | tol = 1.0e-9 |
Detailed Description
Definition at line 10 of file Ptv.h.
Constructor & Destructor Documentation
Ptv::Ptv |
( |
unsigned int |
size_ | ) |
|
Definition at line 41 of file Ptv.cpp.
References dim, and v.
{
dim = size_;
v = new double[dim];
for (unsigned int i=0; i< dim; i++)
{
v[i] = 0.0;
}
}
Ptv::Ptv |
( |
unsigned int |
size_, |
|
|
double * |
v_ |
|
) |
| |
Definition at line 60 of file Ptv.cpp.
References dim, and v.
{
dim = size_;
v = new double[dim];
for (unsigned int i=0; i< dim; i++)
{
v[i] = v_[i];
}
}
Ptv::Ptv |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Ptv::Ptv |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Ptv::Ptv |
( |
const Ptv & |
p | ) |
|
Definition at line 16 of file Ptv.cpp.
References v.
: dim(0)
{
v = new double[0];
}
Definition at line 83 of file Ptv.cpp.
References v.
Member Function Documentation
void Ptv::fill |
( |
double * |
v_ | ) |
|
Definition at line 120 of file Ptv.cpp.
References dim, and v.
{
for (unsigned int i=0; i< dim; i++)
{
v[i] = v_[i];
}
}
bool Ptv::less |
( |
const Ptv & |
p | ) |
const |
Ptv & Ptv::operator= |
( |
const Ptv & |
p | ) |
|
Definition at line 143 of file Ptv.cpp.
References dim, size(), and v.
{
if ( this != &p)
{
if ( dim != p.size())
{
delete [] v;
dim = p.size();
v = new double[dim];
}
for (unsigned int i=0; i< dim; i++)
{
v[i] = p[i];
}
}
return *this;
}
const double & Ptv::operator[] |
( |
unsigned int |
i | ) |
const |
double & Ptv::operator[] |
( |
unsigned int |
i | ) |
|
void Ptv::redim |
( |
unsigned int |
size_, |
|
|
double * |
v_ |
|
) |
| |
void Ptv::redim |
( |
unsigned int |
size_ | ) |
|
Definition at line 105 of file Ptv.cpp.
References dim, and v.
{
if (dim != size_ )
{
delete [] v;
dim = size_;
v = new double[dim];
}
for (unsigned int i=0; i< dim; i++)
{
v[i] = 0.0;
}
}
const unsigned int Ptv::size |
( |
| ) |
const |
Definition at line 129 of file Ptv.cpp.
References dim.
Referenced by SyFi::add(), SyFi::contains2D(), SyFi::cross(), SyFi::is_equal(), less(), SyFi::mul(), SyFi::norm(), SyFi::normalize(), operator<<(), operator=(), Ptv(), and SyFi::sub().
Member Data Documentation
The documentation for this class was generated from the following files: