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_alphabet_interface2.h,v 1.1 2008/08/25 16:20:01 langmead Exp $
19 ==========================================================================*/
21 #ifndef SEQAN_HEADER_BASIC_ALPHABET_INTERFACE2_H
22 #define SEQAN_HEADER_BASIC_ALPHABET_INTERFACE2_H
26 namespace SEQAN_NAMESPACE_MAIN
29 //////////////////////////////////////////////////////////////////////////////
30 // gapValue, gapValueImpl
31 //////////////////////////////////////////////////////////////////////////////
33 .Function.gapValueImpl:
36 ..summary:Implements @Function.gapValue@.
37 ..signature:gapValueImpl(value_pointer_tag)
38 ..param.value_pointer_tag:A pointer that is used as a tag to specify the value type.
39 ...remarks:The pointer needs not to point to a valid object, so it is possible to use a null pointer here.
40 ..returns:A gap character.
41 ..remarks.text:This function implements @Function.getValue@.
42 It is recommended to use @Function.gapValue@ rather than $gapValueImpl$.
50 static T const _gap = T();
59 ..summary:Returns reference to a value that is used as gap character.
60 ..signature:gapValue<TValue>()
61 ..param.TValue:Value type.
62 ..returns:A gap character.
63 ..remarks.text:The function is implemented in @Function.gapValueImpl@.
64 Do not specialize $gapValue$, specialize @Function.gapValueImpl@ instead!
65 ..see:Function.gapValueImpl
74 return gapValueImpl(_tag);
78 //////////////////////////////////////////////////////////////////////////////
79 // supremumValue, supremumValueImpl
80 //////////////////////////////////////////////////////////////////////////////
83 .Function.supremumValueImpl:
86 ..summary:Implements @Function.supremumValue@.
87 ..signature:supremumValueImpl(value_pointer_tag)
88 ..param.value_pointer_tag:A pointer that is used as a tag to specify the value type.
89 ...remarks:The pointer needs not to point to a valid object, so it is possible to use a null pointer here.
90 ..returns:A value $inf$ that holds: $inf >= i$ for all values $i$.
91 ..remarks.text:This function implements @Function.supremumValue@.
92 It is recommended to use @Function.supremumValue@ rather than $supremumValueImpl$.
98 supremumValueImpl(T *)
100 static T const _value = -1;
106 .Function.supremumValue:
108 ..summary:Supremum for a given type.
109 ..signature:supremumValue<T>()
110 ..param.T:An ordered type.
111 ..returns:A value $inf$ that holds: $inf >= i$ for all values $i$ of type $T$.
112 ..remarks.text:The function is implemented in @Function.supremumValueImpl@.
113 Do not specialize $supremumValue$, specialize @Function.supremumValueImpl@ instead!
114 ..see:Function.supremumValueImpl
117 template <typename T>
123 return supremumValueImpl(_tag);
126 //////////////////////////////////////////////////////////////////////////////
127 // infimumValue, infimumValueImpl
128 //////////////////////////////////////////////////////////////////////////////
131 .Function.infimumValueImpl:
134 ..summary:Implements @Function.infimumValue@.
135 ..signature:infimumValueImpl(value_pointer_tag)
136 ..param.value_pointer_tag:A pointer that is used as a tag to specify the value type.
137 ...remarks:The pointer needs not to point to a valid object, so it is possible to use a null pointer here.
138 ..returns:A value $inf$ that holds: $inf <= i$ for all values $i$.
139 ..remarks.text:This function implements @Function.infimumValue@.
140 It is recommended to use @Function.infimumValue@ rather than $infimumValueImpl$.
144 template <typename T>
146 infimumValueImpl(T *)
148 static T const _value = -1;
154 .Function.infimumValue:
156 ..summary:Infimum for a given type.
157 ..signature:infimumValue<T>()
158 ..param.T:An ordered type.
159 ..returns:A value $inf$ that holds: $inf <= i$ for all values $i$ of type $T$.
160 ..remarks.text:The function is implemented in @Function.infimumValueImpl@.
161 Do not specialize $infimumValue$, specialize @Function.infimumValueImpl@ instead!
162 ..see:Function.infimumValueImpl
163 ..see:Function.supremumValue
166 template <typename T>
172 return infimumValueImpl(_tag);
175 //////////////////////////////////////////////////////////////////////////////
176 }// namespace SEQAN_NAMESPACE_MAIN
178 #endif //#ifndef SEQAN_HEADER_...