1 /*==========================================================================
2 SeqAn - The Library for Sequence Analysis
4 ============================================================================
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 3 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 ============================================================================
18 $Id: basic_compare.h,v 1.1 2008/08/25 16:20:01 langmead Exp $
19 ==========================================================================*/
21 #ifndef SEQAN_HEADER_BASIC_COMPARE_H
22 #define SEQAN_HEADER_BASIC_COMPARE_H
24 namespace SEQAN_NAMESPACE_MAIN
27 //////////////////////////////////////////////////////////////////////////////
29 template <typename TLeft, typename TRight>
32 template <typename TLeft, typename TRight>
33 struct CompareType<TLeft const, TRight>
35 typedef typename CompareType<TLeft, TRight>::Type const Type;
37 template <typename TLeft, typename TRight>
38 struct CompareType<TLeft, TRight const>
40 typedef typename CompareType<TLeft, TRight>::Type const Type;
42 template <typename TLeft, typename TRight>
43 struct CompareType<TLeft const, TRight const>
45 typedef typename CompareType<TLeft, TRight>::Type const Type;
48 //////////////////////////////////////////////////////////////////////////////
50 template<typename _T> inline
51 bool lexLess(const _T& _Left, const _T& _Right)
52 { // return lexicographical _Left < _Right
53 typedef typename _MakeUnsigned<_T>::Type TUnsigned;
54 return (TUnsigned)_Left < (TUnsigned)_Right;
57 //////////////////////////////////////////////////////////////////////////////
58 }// namespace SEQAN_NAMESPACE_MAIN
60 #endif //#ifndef SEQAN_HEADER_...