Subversion Repositories gelsvn

Rev

Rev 634 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 634 Rev 636
Line 475... Line 475...
475
        template <class T,class V, unsigned int N>
475
        template <class T,class V, unsigned int N>
476
        inline V v_min(const ArithVec<T,V,N>& v0, const ArithVec<T,V,N>& v1)
476
        inline V v_min(const ArithVec<T,V,N>& v0, const ArithVec<T,V,N>& v1)
477
        {
477
        {
478
            V v;
478
            V v;
479
            std::transform(v0.begin(), v0.end(), v1.begin(), v.begin(),
479
            std::transform(v0.begin(), v0.end(), v1.begin(), v.begin(),
480
                           [](T a, T b){return std::min(a,b);});
480
                           [](T a, T b){return (std::min)(a,b);});
481
            return v;
481
            return v;
482
        }
482
        }
483
        
483
        
484
        /** Returns the vector containing for each coordinate the largest
484
        /** Returns the vector containing for each coordinate the largest
485
         value from two vectors. */
485
         value from two vectors. */
486
        template <class T,class V, unsigned int N>
486
        template <class T,class V, unsigned int N>
487
        inline V v_max(const ArithVec<T,V,N>& v0, const ArithVec<T,V,N>& v1)
487
        inline V v_max(const ArithVec<T,V,N>& v0, const ArithVec<T,V,N>& v1)
488
        {
488
        {
489
            V v;
489
            V v;
490
            std::transform(v0.begin(), v0.end(), v1.begin(), v.begin(),
490
            std::transform(v0.begin(), v0.end(), v1.begin(), v.begin(),
491
                           [](T a, T b){return std::max(a,b);});
491
                           [](T a, T b){return (std::max)(a,b);});
492
            return v;
492
            return v;
493
        }
493
        }
494
        
494
        
495
        
495
        
496
}
496
}