~ubuntu-branches/ubuntu/raring/blitz++/raring

« back to all changes in this revision

Viewing changes to blitz/minmax.h

  • Committer: Bazaar Package Importer
  • Author(s): Konstantinos Margaritis
  • Date: 2005-02-28 20:25:01 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050228202501-3i4f2sknnprsqfhz
Tags: 1:0.8-4
Added missing build-depends (Closes: #297323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 * blitz/minmax.h  Declaration of min and max functions
 
3
 *
 
4
 * $Id: minmax.h,v 1.4 2003/12/11 03:44:22 julianc Exp $
 
5
 *
 
6
 * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU General Public License
 
10
 * as published by the Free Software Foundation; either version 2
 
11
 * of the License, or (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * Suggestions:          blitz-dev@oonumerics.org
 
19
 * Bugs:                 blitz-bugs@oonumerics.org
 
20
 *
 
21
 * For more information, please see the Blitz++ Home Page:
 
22
 *    http://oonumerics.org/blitz/
 
23
 *
 
24
 ***************************************************************************/
 
25
 
1
26
#ifndef BZ_MINMAX_H
2
27
#define BZ_MINMAX_H
3
28
 
12
37
 
13
38
BZ_NAMESPACE(minmax)
14
39
 
15
 
template<class T1, class T2>
 
40
template<typename T1, typename T2>
16
41
BZ_PROMOTE(T1,T2) min(const T1& a, const T2& b)
17
42
{
18
43
    typedef BZ_PROMOTE(T1,T2) T_promote;
23
48
        return T_promote(b);
24
49
}
25
50
 
26
 
template<class T1, class T2>
 
51
template<typename T1, typename T2>
27
52
BZ_PROMOTE(T1,T2) max(const T1& a, const T2& b)
28
53
{
29
54
    typedef BZ_PROMOTE(T1,T2) T_promote;