#include <VolVolume.hpp>
Public Member Functions | |
VOL_dvector (const int s) | |
Construct a vector of size s. | |
VOL_dvector () | |
Default constructor creates a vector of size 0. | |
VOL_dvector (const VOL_dvector &x) | |
Copy constructor makes a replica of x. | |
~VOL_dvector () | |
The destructor deletes the data array. | |
int | size () const |
Return the size of the vector. | |
double & | operator[] (const int i) |
Return a reference to the i -th entry. | |
double | operator[] (const int i) const |
Return the i -th entry. | |
void | clear () |
Delete the content of the vector and replace it with a vector of length 0. | |
void | cc (const double gamma, const VOL_dvector &w) |
Convex combination. | |
void | allocate (const int s) |
delete the current vector and allocate space for a vector of size s . | |
void | swap (VOL_dvector &w) |
swaps the vector with w . | |
VOL_dvector & | operator= (const VOL_dvector &w) |
Copy w into the vector. | |
VOL_dvector & | operator= (const double w) |
Replace every entry in the vector with w . | |
Public Attributes | |
double * | v |
The array holding the vector. | |
int | sz |
The size of the vector. |
It is used for most vector operations.
Note: If VOL_DEBUG
is #defined
to be 1 then each time an entry is accessed in the vector the index of the entry is tested for nonnegativity and for being less than the size of the vector. It's good to turn this on while debugging, but in final runs it should be turned off (beause of the performance hit).
Definition at line 143 of file VolVolume.hpp.
|
Construct a vector of size s. The content of the vector is undefined. Definition at line 152 of file VolVolume.hpp. References VOL_TEST_SIZE. |
|
Default constructor creates a vector of size 0.
Definition at line 157 of file VolVolume.hpp. |
|
Copy constructor makes a replica of x.
Definition at line 159 of file VolVolume.hpp. |
|
The destructor deletes the data array.
Definition at line 167 of file VolVolume.hpp. |
|
Return the size of the vector.
Definition at line 170 of file VolVolume.hpp. |
|
Return a reference to the
Definition at line 173 of file VolVolume.hpp. References VOL_TEST_INDEX. |
|
Return the
Definition at line 179 of file VolVolume.hpp. References VOL_TEST_INDEX. |
|
Delete the content of the vector and replace it with a vector of length 0.
Definition at line 186 of file VolVolume.hpp. |
|
Convex combination.
Replace the current vector Definition at line 193 of file VolVolume.hpp. Referenced by VOL_primal::cc(). |
|
delete the current vector and allocate space for a vector of size
Definition at line 209 of file VolVolume.hpp. References VOL_TEST_SIZE. |
|
swaps the vector with
Definition at line 216 of file VolVolume.hpp. |
|
Copy
|
|
Replace every entry in the vector with
|
|
The array holding the vector.
Definition at line 146 of file VolVolume.hpp. Referenced by cc(), swap(), and VOL_dvector(). |
|
The size of the vector.
Definition at line 148 of file VolVolume.hpp. Referenced by cc(), swap(), and VOL_dvector(). |