Classes | Public Member Functions | Private Attributes
bbgm_image_of< dist > Class Template Reference

An image of distributions. More...

#include <bbgm_image_of.h>

Inheritance diagram for bbgm_image_of< dist >:
Inheritance graph
[legend]

List of all members.

Classes

class  const_iterator
class  iterator
 An iterator over the distribution in the image. More...

Public Member Functions

 bbgm_image_of ()
 Constructor.
 bbgm_image_of (unsigned int ni, unsigned int nj, const dist &model)
virtual const vcl_type_info & dist_typeid () const
 return the type_info for the distribution type.
unsigned int ni () const
 Return the width of the image.
unsigned int nj () const
 Return the height.
void set_size (unsigned ni, unsigned nj)
 resize to ni x nj.
const dist & operator() (unsigned int i, unsigned int j) const
 Read only access to the distributions.
dist & operator() (unsigned int i, unsigned int j)
 Access to the distributions.
void set (unsigned int i, unsigned int j, const dist &d)
 Set the distribution at (i,j) to a copy of d.
iterator begin ()
 Return an iterator to the first element.
iterator end ()
 Return an iterator to one past the last element.
const_iterator begin () const
 Return a const iterator to the first element.
const_iterator end () const
 Return a const iterator to one past the last element.
virtual vcl_string is_a () const
 Return a string name.
virtual bbgm_image_baseclone () const
short version () const
 Return IO version number;.
virtual void b_write (vsl_b_ostream &os) const
 Binary save self to stream.
virtual void b_read (vsl_b_istream &is)
 Binary load self from stream.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Private Attributes

vbl_array_2d< dist > data_
 the data.

Detailed Description

template<class dist>
class bbgm_image_of< dist >

An image of distributions.

Definition at line 38 of file bbgm_image_of.h.


Constructor & Destructor Documentation

template<class dist>
bbgm_image_of< dist >::bbgm_image_of ( ) [inline]

Constructor.

Definition at line 42 of file bbgm_image_of.h.

template<class dist>
bbgm_image_of< dist >::bbgm_image_of ( unsigned int  ni,
unsigned int  nj,
const dist &  model 
) [inline]

Definition at line 43 of file bbgm_image_of.h.


Member Function Documentation

template<class dist_ >
void bbgm_image_of< dist_ >::b_read ( vsl_b_istream is) [virtual]

Binary load self from stream.

Implements bbgm_image_base.

Definition at line 56 of file bbgm_image_of.txx.

template<class dist_ >
void bbgm_image_of< dist_ >::b_write ( vsl_b_ostream os) const [virtual]

Binary save self to stream.

Implements bbgm_image_base.

Definition at line 46 of file bbgm_image_of.txx.

template<class dist>
iterator bbgm_image_of< dist >::begin ( ) [inline]

Return an iterator to the first element.

Definition at line 103 of file bbgm_image_of.h.

template<class dist>
const_iterator bbgm_image_of< dist >::begin ( ) const [inline]

Return a const iterator to the first element.

Definition at line 107 of file bbgm_image_of.h.

template<class dist_ >
bbgm_image_base * bbgm_image_of< dist_ >::clone ( ) const [virtual]

Implements bbgm_image_base.

Definition at line 28 of file bbgm_image_of.txx.

template<class dist>
virtual const vcl_type_info& bbgm_image_of< dist >::dist_typeid ( ) const [inline, virtual]

return the type_info for the distribution type.

Implements bbgm_image_base.

Definition at line 47 of file bbgm_image_of.h.

template<class dist>
iterator bbgm_image_of< dist >::end ( ) [inline]

Return an iterator to one past the last element.

Definition at line 105 of file bbgm_image_of.h.

template<class dist>
const_iterator bbgm_image_of< dist >::end ( ) const [inline]

Return a const iterator to one past the last element.

Definition at line 109 of file bbgm_image_of.h.

template<class dist_ >
vcl_string bbgm_image_of< dist_ >::is_a ( ) const [virtual]

Return a string name.

Note:
this is probably not portable

Implements bbgm_image_base.

Definition at line 20 of file bbgm_image_of.txx.

template<class dist>
unsigned int bbgm_image_of< dist >::ni ( ) const [inline]

Return the width of the image.

Definition at line 50 of file bbgm_image_of.h.

template<class dist>
unsigned int bbgm_image_of< dist >::nj ( ) const [inline]

Return the height.

Definition at line 53 of file bbgm_image_of.h.

template<class dist>
const dist& bbgm_image_of< dist >::operator() ( unsigned int  i,
unsigned int  j 
) const [inline]

Read only access to the distributions.

Definition at line 60 of file bbgm_image_of.h.

template<class dist>
dist& bbgm_image_of< dist >::operator() ( unsigned int  i,
unsigned int  j 
) [inline]

Access to the distributions.

Definition at line 64 of file bbgm_image_of.h.

template<class dist>
void bbgm_image_of< dist >::set ( unsigned int  i,
unsigned int  j,
const dist &  d 
) [inline]

Set the distribution at (i,j) to a copy of d.

Definition at line 68 of file bbgm_image_of.h.

template<class dist>
void bbgm_image_of< dist >::set_size ( unsigned  ni,
unsigned  nj 
) [inline]

resize to ni x nj.

If already correct size, this function returns quickly

Definition at line 57 of file bbgm_image_of.h.

template<class dist_ >
short bbgm_image_of< dist_ >::version ( ) const

Return IO version number;.

Definition at line 37 of file bbgm_image_of.txx.


Member Data Documentation

template<class dist>
vbl_array_2d<dist> bbgm_image_of< dist >::data_ [private]

the data.

Definition at line 131 of file bbgm_image_of.h.


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