LLVM API Documentation

PBQP::Vector Class Reference

PBQP Vector class. More...

#include <PBQPMath.h>

Collaboration diagram for PBQP::Vector:
[legend]

List of all members.

Public Member Functions

 Vector (unsigned length)
 Construct a PBQP vector of the given size.
 Vector (unsigned length, PBQPNum initVal)
 Construct a PBQP vector with initializer.
 Vector (const Vector &v)
 Copy construct a PBQP vector.
 ~Vector ()
 Destroy this vector, return its memory.
Vector & operator= (const Vector &v)
 Assignment operator.
unsigned getLength () const
 Return the length of the vector.
PBQPNum & operator[] (unsigned index)
 Element access.
const PBQPNum & operator[] (unsigned index) const
 Const element access.
Vector & operator+= (const Vector &v)
 Add another vector to this one.
Vector & operator-= (const Vector &v)
 Subtract another vector from this one.
unsigned minIndex () const
 Returns the index of the minimum value in this vector.


Detailed Description

PBQP Vector class.

Definition at line 22 of file PBQPMath.h.


Constructor & Destructor Documentation

PBQP::Vector::Vector ( unsigned  length  )  [inline, explicit]

Construct a PBQP vector of the given size.

Definition at line 26 of file PBQPMath.h.

PBQP::Vector::Vector ( unsigned  length,
PBQPNum  initVal 
) [inline]

Construct a PBQP vector with initializer.

Definition at line 31 of file PBQPMath.h.

PBQP::Vector::Vector ( const Vector &  v  )  [inline]

Copy construct a PBQP vector.

Definition at line 37 of file PBQPMath.h.

References data.

PBQP::Vector::~Vector (  )  [inline]

Destroy this vector, return its memory.

Definition at line 43 of file PBQPMath.h.


Member Function Documentation

Vector& PBQP::Vector::operator= ( const Vector &  v  )  [inline]

Assignment operator.

Definition at line 46 of file PBQPMath.h.

References data, and length.

unsigned PBQP::Vector::getLength (  )  const [inline]

PBQPNum& PBQP::Vector::operator[] ( unsigned  index  )  [inline]

Element access.

Definition at line 60 of file PBQPMath.h.

const PBQPNum& PBQP::Vector::operator[] ( unsigned  index  )  const [inline]

Const element access.

Definition at line 66 of file PBQPMath.h.

Vector& PBQP::Vector::operator+= ( const Vector &  v  )  [inline]

Add another vector to this one.

Definition at line 72 of file PBQPMath.h.

References data, and length.

Vector& PBQP::Vector::operator-= ( const Vector &  v  )  [inline]

Subtract another vector from this one.

Definition at line 79 of file PBQPMath.h.

References data, and length.

unsigned PBQP::Vector::minIndex (  )  const [inline]

Returns the index of the minimum value in this vector.

Definition at line 86 of file PBQPMath.h.


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