GeneralBrokenLines V03-01-03
using EIGEN
Public Member Functions | Private Attributes | List of all members
gbl::VVector Class Reference

Simple Vector based on std::vector<double> More...

#include <VMatrix.h>

Public Member Functions

 VVector (const unsigned int nRows=0)
 
 VVector (const VVector &aVector)
 
virtual ~VVector ()
 
void resize (const unsigned int nRows)
 Resize vector. More...
 
void setZero ()
 Set content to 0. More...
 
VVector getVec (unsigned int len, unsigned int start=0) const
 Get part of vector. More...
 
void putVec (const VVector &aVector, unsigned int start=0)
 Put part of vector. More...
 
double & operator() (unsigned int i)
 access element (i) More...
 
double operator() (unsigned int i) const
 access element (i) More...
 
unsigned int getNumRows () const
 Get number of rows. More...
 
void print () const
 Print vector. More...
 
VVector operator- (const VVector &aVector) const
 Subtraction Vector-Vector. More...
 
VVectoroperator= (const VVector &aVector)
 Assignment Vector=Vector. More...
 

Private Attributes

unsigned int numRows
 Number of rows. More...
 
std::vector< double > theVec
 Data. More...
 

Detailed Description

Simple Vector based on std::vector<double>

Definition at line 43 of file VMatrix.h.

Constructor & Destructor Documentation

◆ VVector() [1/2]

gbl::VVector::VVector ( const unsigned int  nRows = 0)

Definition at line 256 of file VMatrix.cpp.

◆ VVector() [2/2]

gbl::VVector::VVector ( const VVector aVector)

Definition at line 260 of file VMatrix.cpp.

◆ ~VVector()

gbl::VVector::~VVector ( )
virtual

Definition at line 265 of file VMatrix.cpp.

Member Function Documentation

◆ getNumRows()

unsigned int gbl::VVector::getNumRows ( ) const

Get number of rows.

Returns
Number of rows.

Definition at line 308 of file VMatrix.cpp.

References numRows.

Referenced by operator=().

◆ getVec()

VVector gbl::VVector::getVec ( unsigned int  len,
unsigned int  start = 0 
) const

Get part of vector.

Parameters
[in]lenLength of part.
[in]startOffset of part.
Returns
Part of vector.

Definition at line 288 of file VMatrix.cpp.

References theVec.

Referenced by gbl::BorderedBandMatrix::solveAndInvertBorderedBand().

◆ operator()() [1/2]

double & gbl::VVector::operator() ( unsigned int  i)
inline

access element (i)

Definition at line 118 of file VMatrix.h.

References theVec.

◆ operator()() [2/2]

double gbl::VVector::operator() ( unsigned int  i) const
inline

access element (i)

Definition at line 123 of file VMatrix.h.

References theVec.

◆ operator-()

VVector gbl::VVector::operator- ( const VVector aVector) const

Subtraction Vector-Vector.

Definition at line 327 of file VMatrix.cpp.

References numRows, and theVec.

◆ operator=()

VVector & gbl::VVector::operator= ( const VVector aVector)

Assignment Vector=Vector.

Definition at line 336 of file VMatrix.cpp.

References getNumRows(), numRows, and theVec.

◆ print()

void gbl::VVector::print ( ) const

Print vector.

Definition at line 313 of file VMatrix.cpp.

References numRows, and theVec.

Referenced by gbl::GblTrajectory::printTrajectory().

◆ putVec()

void gbl::VVector::putVec ( const VVector aVector,
unsigned int  start = 0 
)

Put part of vector.

Parameters
[in]aVectorVector with part.
[in]startOffset of part.

Definition at line 299 of file VMatrix.cpp.

References numRows, and theVec.

Referenced by gbl::BorderedBandMatrix::solveAndInvertBorderedBand().

◆ resize()

void gbl::VVector::resize ( const unsigned int  nRows)

Resize vector.

Parameters
[in]nRowsNumber of rows.

Definition at line 272 of file VMatrix.cpp.

References numRows, and theVec.

Referenced by gbl::GblTrajectory::buildLinearEquationSystem().

◆ setZero()

void gbl::VVector::setZero ( )

Set content to 0.

Definition at line 278 of file VMatrix.cpp.

References theVec.

Referenced by gbl::GblTrajectory::buildLinearEquationSystem().

Member Data Documentation

◆ numRows

unsigned int gbl::VVector::numRows
private

Number of rows.

Definition at line 59 of file VMatrix.h.

Referenced by getNumRows(), operator-(), operator=(), print(), putVec(), and resize().

◆ theVec

std::vector<double> gbl::VVector::theVec
private

Data.

Definition at line 60 of file VMatrix.h.

Referenced by getVec(), operator()(), operator-(), operator=(), print(), putVec(), resize(), and setZero().


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