SkelGIS  3.0
/home/helene/Documents/These/SkelGIS/SkelGIS_Library/SkelGIS_V3/skelgis/skeletons/basic_skeletons/DDAG/apply_unary_ddag.hpp
Go to the documentation of this file.
00001 /*! \file apply_unary_ddag.hpp
00002  *  \brief Definitions of the skeleton object ApplyUnary. This skeleton takes a user function and a DMatrix as inputs and return a new DMatrix as output.
00003  */
00004 #ifndef APPLY_UNARY_DDAG_H
00005 #define APPLY_UNARY_DDAG_H
00006 
00007 namespace skelgis{
00008 
00009   //================================================================================
00010   //Types of user functions
00011   //================================================================================
00012   //! _ApplyUnaryDDAG_Func structure
00013   /*!
00014   */
00015   //-------------------------------------------------------------------------------
00016   template <class DPMap_Nodes_in, class DPMap_Edges_in, class DPMap_Nodes_out,class DPMap_Edges_out> struct _ApplyUnaryDDAG_Func
00017   //-------------------------------------------------------------------------------
00018   {
00019     virtual void operator()(DPMap_Nodes_in&, DPMap_Edges_in&, DPMap_Nodes_out&, DPMap_Edges_out&) const =0;
00020   };
00021 
00022   //================================================================================
00023   //Specializations of skeleton ApplyUnary
00024   //================================================================================
00025   //! ApplyUnary structure
00026   /*!
00027   */
00028   //-------------------------------------------------------------------------------
00029   template<class DPMap_Nodes_in, class DPMap_Edges_in, class DPMap_Nodes_out,class DPMap_Edges_out> struct ApplyUnaryDDAG
00030   {
00031     static void apply(const _ApplyUnaryDDAG_Func<DPMap_Nodes_in,DPMap_Edges_in,DPMap_Nodes_out,DPMap_Edges_out>& func, DPMap_Nodes_in& no, DPMap_Edges_in& ed, DPMap_Nodes_out& no2, DPMap_Edges_out& ed2)
00032     {
00033       no.start_communications();
00034       no.end_communications();
00035       ed.start_communications();
00036       ed.end_communications();
00037       func(no,ed,no2,ed2);
00038     }
00039   };
00040   //-------------------------------------------------------------------------------
00041 }
00042 
00043 #endif
 All Classes Files Functions Variables Defines