internals::SparsityPatternTools Namespace Reference

Functions

static const unsigned intoptimized_lower_bound (const unsigned int *first, const unsigned int *last, const unsigned int &val)
unsigned int get_column_index_from_iterator (const unsigned int i)
template<typename value >
unsigned int get_column_index_from_iterator (const std::pair< unsigned int, value > &i)
template<typename value >
unsigned int get_column_index_from_iterator (const std::pair< const unsigned int, value > &i)

Function Documentation

static const unsigned int* internals::SparsityPatternTools::optimized_lower_bound ( const unsigned int first,
const unsigned int last,
const unsigned int val 
) [inline, static]

Optimized replacement for std::lower_bound for searching within the range of column indices. Slashes execution time by approximately one half for the present application, partly because we have eliminated templates and the compiler seems to be able to optimize better, and partly because the binary search is replaced by a linear search for small loop lengths.

References Assert.

unsigned int internals::SparsityPatternTools::get_column_index_from_iterator ( const unsigned int  i  ) 

Helper function to get the column index from a dereferenced iterator in the copy_from() function, if the inner iterator type points to plain unsigned integers.

template<typename value >
unsigned int internals::SparsityPatternTools::get_column_index_from_iterator ( const std::pair< unsigned int, value > &  i  )  [inline]

Helper function to get the column index from a dereferenced iterator in the copy_from() function, if the inner iterator type points to pairs of unsigned integers and some other value.

template<typename value >
unsigned int internals::SparsityPatternTools::get_column_index_from_iterator ( const std::pair< const unsigned int, value > &  i  )  [inline]

Likewise, but sometimes needed for certain types of containers that make the first element of the pair constant (such as std::map).


deal.II documentation generated on Mon Nov 23 22:58:26 2009 by doxygen 1.6.1