Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Vector Class Reference

#include <Vector.h>

Collaboration diagram for Vector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BLUB_TYPE (size_type)
 BLUB_TYPE (iterator)
 BLUB_TYPE (const_iterator)
 Vector ()
 unhide selected functions...

 Vector (uint items, real values)
 filled constructor

 Vector (const Vector &src)
 Vector (size_type size)
Vector & operator= (const Vector &v)
size_type size () const
void reserve (size_type s)
void resize (size_type s)
iterator begin ()
const_iterator begin () const
const_iterator end () const
real & operator[] (uint i)
const real & operator[] (uint i) const
void clear ()
void push_back (const real &x)
real magnitude () const
 more sugar here...

void normalize ()
Vector operator- (const Vector &v) const
Vector operator+ (const Vector &v) const
Vector & operator+= (const Vector &v)
Vector subset (uint start=0) const
Vector subset (uint start, uint size=0) const
void setAll (real val)
 set all elements to val

void null ()
 set all elements to 0

Vector & append (const Vector &v)
 Insert contents of another vector at the end of this one.

void setMore (const Vector &v, uint startIndex=0)
 Will be resized if necessary.

void clamp (real min, real max)
 all elements will be clamped to the given interval (inclusive)

Vector & operator *= (const real r)
 scalars

Vector operator * (const real r) const
Vector operator+ (const real r) const
Vector & operator+= (const real r)
real distance (const Vector &to) const
 operator std::string () const
 example: "(1.4,4.4,4.5)"

void toStream (std::ostream &s) const

Static Public Member Functions

Vector fromInts (std::vector< int > iv)
Vector fromInts (uint size, int *data)

Static Public Attributes

const Vector ZOID

Protected Member Functions

template<class InputIterator>  Vector (InputIterator f, InputIterator t)

Friends

bool operator== (const Vector &o1, const Vector &o2)

Constructor & Destructor Documentation

Vector (   )  [inline]
 

unhide selected functions...

Vector (  uint  items,
real  values
)  [inline]
 

filled constructor

Vector (  const Vector &  src  )  [inline]
 

Vector (  size_type  size  )  [inline]
 

Here is the call graph for this function:

Vector (  InputIterator  f,
InputIterator  t
)  [inline, protected]
 


Member Function Documentation

Vector& append (  const Vector &  v  ) 
 

Insert contents of another vector at the end of this one.

Returns:
reference to self

const_iterator begin (   )  const [inline]
 

iterator begin (   )  [inline]
 

BLUB_TYPE (  const_iterator   ) 
 

BLUB_TYPE (  iterator   ) 
 

BLUB_TYPE (  size_type   ) 
 

void clamp (  real  min,
real  max
) 
 

all elements will be clamped to the given interval (inclusive)

void clear (   )  [inline]
 

real distance (  const Vector &  to  )  const
 

const_iterator end (   )  const [inline]
 

Vector fromInts (  uint  size,
int *  data
)  [static]
 

Vector fromInts (  std::vector< int >  iv  )  [static]
 

real magnitude (   )  const
 

more sugar here...

void normalize (   ) 
 

void null (   )  [inline]
 

set all elements to 0

Here is the call graph for this function:

Vector operator * (  const real  r  )  const
 

Vector& operator *= (  const real  r  ) 
 

scalars

operator std::string (   )  const
 

example: "(1.4,4.4,4.5)"

Vector operator+ (  const real  r  )  const
 

Vector operator+ (  const Vector &  v  )  const
 

Vector& operator+= (  const real  r  ) 
 

Vector& operator+= (  const Vector &  v  ) 
 

Vector operator- (  const Vector &  v  )  const
 

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

const real& operator[] (  uint  i  )  const [inline]
 

real& operator[] (  uint  i  )  [inline]
 

void push_back (  const real &  x  )  [inline]
 

void reserve (  size_type  s  )  [inline]
 

void resize (  size_type  s  )  [inline]
 

void setAll (  real  val  ) 
 

set all elements to val

void setMore (  const Vector &  v,
uint  startIndex = 0
) 
 

Will be resized if necessary.

size_type size (   )  const [inline]
 

Vector subset (  uint  start,
uint  size = 0
)  const
 

Vector subset (  uint  start = 0  )  const [inline]
 

Here is the call graph for this function:

void toStream (  std::ostream &  s  )  const
 


Friends And Related Function Documentation

bool operator== (  const Vector &  o1,
const Vector &  o2
)  [friend]
 


Member Data Documentation

const Vector ZOID [static]
 


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 13:19:36 2004 for Annie by doxygen 1.3.5