libfbm  0.3
Simulation of multi-dimensional stationary Gaussian processes and fractional Brownian motion.
 All Classes Namespaces Functions Variables Friends
Public Member Functions | Friends
libfbm::zvec Class Reference

Integer vector. More...

#include <libfbm.hpp>

List of all members.

Public Member Functions

 zvec (size_t dim)
int & operator[] (size_t i)
const int & operator[] (size_t i) const
size_t size () const
bool increment (int base)
 Iterate the vector value using the given base.
bool increment (const zvec &dim)
 Iterate the vector value using the given dimensions.
bool increment_but (const zvec &dim, size_t hold)
 Iterate the vector value using the given dimensions except for the dimension with index hold.
size_t index (size_t base) const
 Serialized position of the vector.
size_t index (const zvec &dim) const
 Serialized position of the vector.
void zero ()
 Zero all vector components.

Friends

zvec operator+ (const zvec &l, const zvec &r)
zvec operator- (const zvec &l, const zvec &r)
zvec operator* (int f, const zvec &v)
zvec operator* (const zvec &v, int f)

Detailed Description

Integer vector.

The maximum dimension of the vector is hardcoded in the LIBFBM_MAX_DIM (it is 8 by default).

Definition at line 411 of file libfbm.hpp.


Constructor & Destructor Documentation

libfbm::zvec::zvec ( size_t  dim)
inline

Definition at line 414 of file libfbm.hpp.


Member Function Documentation

bool libfbm::zvec::increment ( int  base)
inline

Iterate the vector value using the given base.

Returns:
Returns false when values at all indices are equal to base.

Definition at line 423 of file libfbm.hpp.

bool libfbm::zvec::increment ( const zvec dim)
inline

Iterate the vector value using the given dimensions.

dim.size() must be the same as vector size.

Returns:
Returns false when values at all indices are equal to their dimension.

Definition at line 441 of file libfbm.hpp.

bool libfbm::zvec::increment_but ( const zvec dim,
size_t  hold 
)
inline

Iterate the vector value using the given dimensions except for the dimension with index hold.

dim.size() must be the same as vector size.

Returns:
Returns false when values at all indices are equal to their dimension.

Definition at line 459 of file libfbm.hpp.

size_t libfbm::zvec::index ( size_t  base) const
inline

Serialized position of the vector.

Definition at line 477 of file libfbm.hpp.

size_t libfbm::zvec::index ( const zvec dim) const
inline

Serialized position of the vector.

Definition at line 490 of file libfbm.hpp.

int& libfbm::zvec::operator[] ( size_t  i)
inline

Definition at line 416 of file libfbm.hpp.

const int& libfbm::zvec::operator[] ( size_t  i) const
inline

Definition at line 417 of file libfbm.hpp.

size_t libfbm::zvec::size ( ) const
inline

Definition at line 419 of file libfbm.hpp.

void libfbm::zvec::zero ( )
inline

Zero all vector components.

Definition at line 503 of file libfbm.hpp.


Friends And Related Function Documentation

zvec operator* ( int  f,
const zvec v 
)
friend

Definition at line 525 of file libfbm.hpp.

zvec operator* ( const zvec v,
int  f 
)
friend

Definition at line 533 of file libfbm.hpp.

zvec operator+ ( const zvec l,
const zvec r 
)
friend

Definition at line 509 of file libfbm.hpp.

zvec operator- ( const zvec l,
const zvec r 
)
friend

Definition at line 517 of file libfbm.hpp.


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