diff --git a/cwVectOps.h b/cwVectOps.h index bc8f087..ddd9123 100644 --- a/cwVectOps.h +++ b/cwVectOps.h @@ -169,6 +169,30 @@ namespace cw return v0; } + + + //================================================================================================================== + // find, count + // + + template< typename T0, typename T1 > + unsigned find( const T0* v, unsigned n, const T1& m ) + { + for(unsigned i=0; i + unsigned count( const T0* v, unsigned n, const T1& m ) + { + unsigned cnt = 0; + for(unsigned i=0; i