Classes | Functions
contrib/mul/mbl/mbl_stl_pred.h File Reference

Useful predicate functors for use in stl find_if,partition etc. More...

#include <vcl_functional.h>
#include <vcl_vector.h>
#include <vcl_string.h>
#include <vcl_utility.h>
#include <vcl_cmath.h>
#include <vnl/vnl_vector.h>

Go to the source code of this file.

Classes

class  mbl_stl_pred_str_contains
 Return true if a string contains a substring. More...
class  mbl_stl_pred_index_adapter< T, Pred >
 Adapt a predicate over a vector to the operation specified on an index into that vector. More...
class  mbl_stl_pred_index_adapter_n< T, Pred >
class  mbl_stl_pred_binary_index_adapter< T, Pred >
 Adapt a predicate over a vector to the operation specified on an index into that vector. More...
struct  mbl_stl_pred_iter_deref_order< Iter >
struct  mbl_stl_pred_pair_iter_key_order< PairIter >
struct  mbl_stl_pred_pair_iter_value_order< PairIter >
struct  mbl_stl_pred_pair_key_order< Pair >
struct  mbl_stl_pred_pair_value_order< Pair >
struct  mbl_stl_pred_pair_order< T1, T2 >
class  mbl_stl_pred_is_a< T >
class  mbl_stl_pred_is_near

Functions

template<class T , class Pred >
mbl_stl_pred_index_adapter< T,
Pred > 
mbl_stl_pred_create_index_adapter (const vcl_vector< T > &v, Pred Op)
 Helper function to create an index adapter of the appropriate type.
template<class T , class Pred >
mbl_stl_pred_index_adapter_n
< T, Pred > 
mbl_stl_pred_create_index_adapter (const vnl_vector< T > &v, Pred Op)
 Helper function to create an index adapter of the appropriate type.
template<class T , class Pred >
mbl_stl_pred_binary_index_adapter
< T, Pred > 
mbl_stl_pred_create_binary_index_adapter (const vcl_vector< T > &v, Pred Op)
 Helper function to create an index adapter of the appropriate type.

Detailed Description

Useful predicate functors for use in stl find_if,partition etc.

Author:
martin roberts
Date:
July 2004

Definition in file mbl_stl_pred.h.


Function Documentation

template<class T , class Pred >
mbl_stl_pred_binary_index_adapter<T,Pred> mbl_stl_pred_create_binary_index_adapter ( const vcl_vector< T > &  v,
Pred  Op 
) [inline]

Helper function to create an index adapter of the appropriate type.

As this is a function not a class, it saves some template gobbledegook in the class name Vec is assumed vector<T> where T is the type associated with the constructed adapter However note that using this means an extra copy of the predicate functor will occur

Definition at line 109 of file mbl_stl_pred.h.

template<class T , class Pred >
mbl_stl_pred_index_adapter<T,Pred> mbl_stl_pred_create_index_adapter ( const vcl_vector< T > &  v,
Pred  Op 
) [inline]

Helper function to create an index adapter of the appropriate type.

As this is a function not a class, it saves some template gobbledegook in the class name Vec is assumed vector<T> where T is the type associated with the constructed adapter However note that using this means an extra copy of the predicate functor will occur

Definition at line 72 of file mbl_stl_pred.h.

template<class T , class Pred >
mbl_stl_pred_index_adapter_n<T,Pred> mbl_stl_pred_create_index_adapter ( const vnl_vector< T > &  v,
Pred  Op 
) [inline]

Helper function to create an index adapter of the appropriate type.

As this is a function not a class, it saves some template gobbledegook in the class name Vec is assumed vector<T> where T is the type associated with the constructed adapter However note that using this means an extra copy of the predicate functor will occur

Definition at line 81 of file mbl_stl_pred.h.