Commit f82aa47d authored by Pierre Kraemer's avatar Pierre Kraemer

generic degree : ajout parametre template MAP

parent e4faadd2
...@@ -685,7 +685,7 @@ public: ...@@ -685,7 +685,7 @@ public:
//! For an orbit of a given dimension, return the number of incident cells of an other given dimension //! For an orbit of a given dimension, return the number of incident cells of an other given dimension
/*! @param d a dart /*! @param d a dart
*/ */
template <unsigned int ORBIT, unsigned int INCIDENT> template <typename MAP, unsigned int ORBIT, unsigned int INCIDENT>
unsigned int degree(Dart d); unsigned int degree(Dart d);
protected: protected:
......
...@@ -612,11 +612,11 @@ unsigned int GenericMap::getNbOrbits(const FunctorSelect& good) ...@@ -612,11 +612,11 @@ unsigned int GenericMap::getNbOrbits(const FunctorSelect& good)
return fcount.getNb(); return fcount.getNb();
} }
template <unsigned int ORBIT, unsigned int INCIDENT> template <typename MAP, unsigned int ORBIT, unsigned int INCIDENT>
unsigned int GenericMap::degree(Dart d) unsigned int GenericMap::degree(Dart d)
{ {
assert(ORBIT != INCIDENT || !"degree does not manage adjacency counting"); assert(ORBIT != INCIDENT || !"degree does not manage adjacency counting");
Traversor<GenericMap>* t = TraversorFactory<GenericMap>::createIncident(*this, d, dimension(), ORBIT, INCIDENT) ; Traversor<MAP>* t = TraversorFactory<MAP>::createIncident(*this, d, dimension(), ORBIT, INCIDENT) ;
FunctorCount fcount ; FunctorCount fcount ;
t->applyFunctor(fcount) ; t->applyFunctor(fcount) ;
return fcount.getNb() ; return fcount.getNb() ;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment