VOL_dvector Class Reference

vector of doubles. More...

#include <OsiTestSolver.hpp>

List of all members.

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_dvectoroperator= (const VOL_dvector &w)
 Copy w into the vector.
VOL_dvectoroperator= (const double w)
 Replace every entry in the vector with w.
 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_dvectoroperator= (const VOL_dvector &w)
 Copy w into the vector.
VOL_dvectoroperator= (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.

Detailed Description

vector of doubles.

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 149 of file OsiTestSolver.hpp.


Constructor & Destructor Documentation

VOL_dvector::VOL_dvector ( const int  s  )  [inline]

Construct a vector of size s.

The content of the vector is undefined.

Definition at line 158 of file OsiTestSolver.hpp.

References sz, v, and VOL_TEST_SIZE.

VOL_dvector::VOL_dvector (  )  [inline]

Default constructor creates a vector of size 0.

Definition at line 163 of file OsiTestSolver.hpp.

VOL_dvector::VOL_dvector ( const VOL_dvector x  )  [inline]

Copy constructor makes a replica of x.

Definition at line 165 of file OsiTestSolver.hpp.

References sz, and v.

VOL_dvector::~VOL_dvector (  )  [inline]

The destructor deletes the data array.

Definition at line 173 of file OsiTestSolver.hpp.

References v.

VOL_dvector::VOL_dvector ( const int  s  )  [inline]

Construct a vector of size s.

The content of the vector is undefined.

Definition at line 156 of file VolVolume.hpp.

References sz, v, and VOL_TEST_SIZE.

VOL_dvector::VOL_dvector (  )  [inline]

Default constructor creates a vector of size 0.

Definition at line 161 of file VolVolume.hpp.

VOL_dvector::VOL_dvector ( const VOL_dvector x  )  [inline]

Copy constructor makes a replica of x.

Definition at line 163 of file VolVolume.hpp.

References sz, and v.

VOL_dvector::~VOL_dvector (  )  [inline]

The destructor deletes the data array.

Definition at line 171 of file VolVolume.hpp.

References v.


Member Function Documentation

int VOL_dvector::size (  )  const [inline]

Return the size of the vector.

Definition at line 176 of file OsiTestSolver.hpp.

References sz.

double& VOL_dvector::operator[] ( const int  i  )  [inline]

Return a reference to the i-th entry.

Definition at line 179 of file OsiTestSolver.hpp.

References sz, v, and VOL_TEST_INDEX.

double VOL_dvector::operator[] ( const int  i  )  const [inline]

Return the i-th entry.

Definition at line 185 of file OsiTestSolver.hpp.

References sz, v, and VOL_TEST_INDEX.

void VOL_dvector::clear (  )  [inline]

Delete the content of the vector and replace it with a vector of length 0.

Definition at line 192 of file OsiTestSolver.hpp.

References sz, and v.

void VOL_dvector::cc ( const double  gamma,
const VOL_dvector w 
) [inline]

Convex combination.

Replace the current vector v with v = (1-gamma) v + gamma w.

Definition at line 199 of file OsiTestSolver.hpp.

References sz, and v.

Referenced by VOL_primal::cc().

void VOL_dvector::allocate ( const int  s  )  [inline]

delete the current vector and allocate space for a vector of size s.

Definition at line 215 of file OsiTestSolver.hpp.

References sz, v, and VOL_TEST_SIZE.

void VOL_dvector::swap ( VOL_dvector w  )  [inline]

swaps the vector with w.

Definition at line 222 of file OsiTestSolver.hpp.

References sz, and v.

Referenced by swap().

VOL_dvector& VOL_dvector::operator= ( const VOL_dvector w  ) 

Copy w into the vector.

VOL_dvector& VOL_dvector::operator= ( const double  w  ) 

Replace every entry in the vector with w.

int VOL_dvector::size (  )  const [inline]

Return the size of the vector.

Definition at line 174 of file VolVolume.hpp.

References sz.

double& VOL_dvector::operator[] ( const int  i  )  [inline]

Return a reference to the i-th entry.

Definition at line 177 of file VolVolume.hpp.

References sz, v, and VOL_TEST_INDEX.

double VOL_dvector::operator[] ( const int  i  )  const [inline]

Return the i-th entry.

Definition at line 183 of file VolVolume.hpp.

References sz, v, and VOL_TEST_INDEX.

void VOL_dvector::clear (  )  [inline]

Delete the content of the vector and replace it with a vector of length 0.

Definition at line 190 of file VolVolume.hpp.

References sz, and v.

void VOL_dvector::cc ( const double  gamma,
const VOL_dvector w 
) [inline]

Convex combination.

Replace the current vector v with v = (1-gamma) v + gamma w.

Definition at line 197 of file VolVolume.hpp.

References sz, and v.

void VOL_dvector::allocate ( const int  s  )  [inline]

delete the current vector and allocate space for a vector of size s.

Definition at line 213 of file VolVolume.hpp.

References sz, v, and VOL_TEST_SIZE.

void VOL_dvector::swap ( VOL_dvector w  )  [inline]

swaps the vector with w.

Definition at line 220 of file VolVolume.hpp.

References swap(), sz, and v.

VOL_dvector& VOL_dvector::operator= ( const VOL_dvector w  ) 

Copy w into the vector.

VOL_dvector& VOL_dvector::operator= ( const double  w  ) 

Replace every entry in the vector with w.


Member Data Documentation

double * VOL_dvector::v

The array holding the vector.

Definition at line 152 of file OsiTestSolver.hpp.

Referenced by allocate(), cc(), clear(), operator[](), swap(), VOL_dvector(), and ~VOL_dvector().

The size of the vector.

Definition at line 154 of file OsiTestSolver.hpp.

Referenced by allocate(), cc(), clear(), operator[](), size(), swap(), and VOL_dvector().


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

Generated on 11 Feb 2012 for coin-Bcp by  doxygen 1.6.1