pMinMax.h 1.79 KB
Newer Older
Pierre Aubert's avatar
Pierre Aubert committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
/***************************************
	Auteur : Pierre Aubert
	Mail : aubertp7@gmail.com
	Licence : CeCILL-C
****************************************/

#ifndef __PMIN_MAX_H__
#define __PMIN_MAX_H__

#include <stdio.h>
#include <math.h>
#include <iostream>

template<class T>
T pmin(const T & a, const T & b);

template<class T>
T pmax(const T & a, const T & b);

template <class T>
T pmin4(const T & x, const T & y, const T & z, const T & t);

template <class T>
T pmax4(const T & x, const T & y, const T & z, const T & t);

template<class T>
T pminTab(const T* tab, size_t size);

template<class T>
size_t pminTabPos(const T* tab, size_t size);

template<class T>
size_t pminTabPos(T & minVal, const T* tab, size_t size);

template<class T>
T pmaxTab(const T* tab, size_t size);

template<class T>
size_t pmaxTabPos(const T* tab, size_t size);

template<class T>
size_t pmaxTabPos(T & maxVal, const T* tab, size_t size);

template<class T>
void pminmaxTab(T & xmin, T & xmax, const T* tab, size_t size);

template<class T>
void pminVec(T * vecMin, const T* tab1, const T * tab2, size_t size);

template<class T>
void pmaxVec(T * vecMax, const T* tab1, const T * tab2, size_t size);

template<class T>
void pminmaxMatrix(T * tabMin, T * tabMax, size_t nbCol, const T* matrix, size_t nbRow);

template<class T>
void pminmaxMatrixPitch(T & xmin, T & xmax, const T* mat, size_t nbRow, size_t nbCol, size_t pitch);

template<class T>
void pminmaxTabXY(T & xmin, T & xmax, T & ymin, T & ymax, const T * tab, size_t sizeNbPair);

template<class T>
void tabXYtoTabXmY(T* tabX, const T* tabXY, size_t sizeTabX);

template<class T>
void tabXYtoTabXmYonX(T* tabX, const T* tabXY, size_t sizeTabX);

template<class T>
size_t getNumberOfDiffrentValues(const T * tab, size_t size, float threshold);



#include "pMinMax_impl.h"

#endif