Package: GrAL Base        GrAL: Packages | Concepts | Homepage

GrAL::grid_function_vector< E, T > Class Template Reference
[Grid Functions]

Implements a grid_function on vector-basis.

Model of TotalGridFunction. More...

#include </home/guntram/tmp/GrAL/gral/base/include/Gral/Base/grid-function-vector.h>

Inheritance diagram for GrAL::grid_function_vector< E, T >:

Inheritance graph
[legend]
Collaboration diagram for GrAL::grid_function_vector< E, T >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
total_grid_function_category 
category
typedef std::vector< T > table_type
typedef table_type::size_type size_type
typedef table_type::value_type value_type
typedef table_type::reference reference
typedef table_type::const_reference const_reference
typedef table_type::pointer pointer
typedef table_type::difference_type difference_type
typedef element_traits< E > et
typedef E element_type
typedef et::ElementIterator ElementIterator
typedef et::handle_type element_handle
typedef et::grid_type grid_type
typedef E const & argument_type
typedef const_reference result_type
typedef grid_function_vector
< E, T > 
gfc2dv
typedef table_type::iterator iter
typedef table_type::const_iterator const_iter
typedef iter iterator
typedef const_iter const_iterator

Public Member Functions

 grid_function_vector (const grid_type &gg)
 grid_function_vector (const grid_type &gg, const T &t)
 grid_function_vector (ref_ptr< grid_type const > gg)
 grid_function_vector (ref_ptr< grid_type const > gg, const T &t)
 grid_function_vector (const gfc2dv &rs)
gfc2dvoperator= (const gfc2dv &rs)
void set_value (value_type const &t)
 set each value to t.
template<class ForwardIterator >
void set_values (ForwardIterator t_begin, ForwardIterator t_end)
 Copy sequence [t_begin, t_end[ .
void init (ref_ptr< grid_type const > gg, const T &t)
void init (const grid_type &gg, const T &t)
void set_grid (ref_ptr< grid_type const > gg)
void set_grid (const grid_type &gg)
void rebind (ref_ptr< grid_type const > gg)
void rebind (const grid_type &gg)
void resize (size_type n)
const grid_type & TheGrid () const
ElementIterator FirstElement () const
ElementIterator EndElement () const
const_reference operator() (const E &e) const
reference operator[] (const E &e)
const_reference operator[] (const E &e) const
bool valid (element_handle e) const
bool bound () const
void cv (const E &e) const
void cv (element_handle e) const
void cb () const
const_reference operator() (const element_handle &e) const
reference operator[] (const element_handle &e)
unsigned size () const
iter begin ()
iter end ()
const_iter begin () const
const_iter end () const

Protected Attributes

ref_ptr< grid_type const > g
table_type table


Detailed Description

template<class E, class T>
class GrAL::grid_function_vector< E, T >

Implements a grid_function on vector-basis.

Model of TotalGridFunction.

This can be used if elements of type E are numbered consecutively.

Example:

  class MyVertex; // vertex_handle is consecutive integer
  
  template<class T>
  class grid_function<MyVertex, T> 
   : public grid_function_vector<MyVertex,T> 
  {
    // repeat constructors
  };

See also:
grid_function_hash

Grid Functions

Definition at line 54 of file grid-function-vector.h.


Member Function Documentation

template<class E, class T>
void GrAL::grid_function_vector< E, T >::set_value ( value_type const &  t  )  [inline]

set each value to t.

Postcondition:
gf(e) == t for all e

Definition at line 106 of file grid-function-vector.h.

template<class E, class T>
template<class ForwardIterator >
void GrAL::grid_function_vector< E, T >::set_values ( ForwardIterator  t_begin,
ForwardIterator  t_end 
) [inline]

Copy sequence [t_begin, t_end[ .

Postcondition:
std::equal(begin(), end(), t_begin(), t_end())

Definition at line 113 of file grid-function-vector.h.


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

©  Guntram Berti 1997-2009. See the GrAL Homepage for up-to-date information.

Generated on Tue Mar 31 19:11:09 2009 for GrAL Base by doxygen 1.5.8