oln::abstract::w_window< Exact > Struct Template Reference

Weight Window. More...

#include <w_window.hh>

Inheritance diagram for oln::abstract::w_window< Exact >:

Inheritance graph
[legend]
Collaboration diagram for oln::abstract::w_window< Exact >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Exact exact_type
 Set the exact type.
typedef struct_elt< Exact > super_type
 Set the super type.
typedef struct_elt_traits<
Exact >::dpoint_type 
dpoint_type
 The associate image's type of dpoint (move point).
typedef struct_elt_traits<
Exact >::weight_type 
weight_type
 Set the type of weight.

Public Member Functions

exact_typeadd (const abstract::dpoint< dpoint_type > &dp, const weight_type &w=1)
 Add a point (with weight) to the w_window.
weight_type w (unsigned i) const
 Get the weight of a point.
const weight_typeset (const abstract::dpoint< dpoint_type > &dp, const weight_type &weight)
 Set the weight of a point if it exists. Otherwise create a new entry.

Static Public Member Functions

static std::string name ()
 Return the name of the type.

Protected Member Functions

exact_typeadd_dp (const abstract::dpoint< dpoint_type > &dp)
 Add a new point with a weight of 1.
 w_window ()
 Do nothing, used only by sub-classes.

Friends

class struct_elt< exact_type >

Detailed Description

template<class Exact>
struct oln::abstract::w_window< Exact >

Weight Window.

A w_window is a set of points associated with a weight. This class defines how to deal with.

Definition at line 62 of file w_window.hh.


Member Typedef Documentation

template<class Exact>
typedef struct_elt_traits<Exact>::dpoint_type oln::abstract::w_window< Exact >::dpoint_type

The associate image's type of dpoint (move point).

Warning:
Prefer the macros oln_dpoint_type(Pointable) and oln_dpoint_type_(Pointable) (the same without the 'typename' keyword)

Reimplemented from oln::abstract::struct_elt< Exact >.

Reimplemented in oln::abstract::window_base< oln::abstract::w_window< oln::w_window3d< T > >, oln::w_window3d< T > >, oln::abstract::window_base< oln::abstract::w_window< oln::w_window2d< T2 > >, oln::w_window2d< T2 > >, oln::abstract::window_base< oln::abstract::w_window< oln::w_window1d< T > >, oln::w_window1d< T > >, oln::abstract::window_base< oln::abstract::w_window< Exact >, Exact >, and oln::abstract::window_base< oln::abstract::w_window< oln::w_window2d< T > >, oln::w_window2d< T > >.

Definition at line 72 of file w_window.hh.


Member Function Documentation

template<class Exact>
exact_type& oln::abstract::w_window< Exact >::add ( const abstract::dpoint< dpoint_type > &  dp,
const weight_type w = 1 
) [inline]

Add a point (with weight) to the w_window.

Add a new member to the w_window.

Todo:
FIXME: Add dpoint with default weight (multiplication neutral element).

Definition at line 94 of file w_window.hh.

Referenced by oln::abstract::w_window< oln::w_window1d< T > >::add_dp().

00095       {
00096         return this->exact().add_(dp.exact(), w);
00097       }

template<class Exact>
weight_type oln::abstract::w_window< Exact >::w ( unsigned  i  )  const [inline]

Get the weight of a point.

Definition at line 105 of file w_window.hh.

Referenced by oln::abstract::w_window< oln::w_window1d< T > >::add(), and oln::convol::slow::convolve().

00106       {
00107         return this->exact().get_weight(i);
00108       }

template<class Exact>
const weight_type& oln::abstract::w_window< Exact >::set ( const abstract::dpoint< dpoint_type > &  dp,
const weight_type weight 
) [inline]

Set the weight of a point if it exists. Otherwise create a new entry.

Definition at line 118 of file w_window.hh.

00120       {
00121         return this->exact().set_(dp.exact(), weight);
00122       }

template<class Exact>
exact_type& oln::abstract::w_window< Exact >::add_dp ( const abstract::dpoint< dpoint_type > &  dp  )  [inline, protected]

Add a new point with a weight of 1.

Todo:
FIXME: Add dpoint with default weight (multiplication neutral element).

Definition at line 134 of file w_window.hh.

00135       {
00136         return this->add(dp.exact(), 1);
00137       }


The documentation for this struct was generated from the following file:
Generated on Tue Feb 20 20:25:22 2007 for Olena by  doxygen 1.5.1