NCBI C++ ToolKit
Integer.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /*****************************************************************************
2  * GATB : Genome Assembly Tool Box
3  * Copyright (C) 2014 INRIA
4  * Authors: R.Chikhi, G.Rizk, E.Drezen
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Affero General Public License as
8  * published by the Free Software Foundation, either version 3 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Affero General Public License for more details.
15  *
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *****************************************************************************/
19 
20 /** \file Integer.hpp
21  * \date 01/03/2013
22  * \author edrezen
23  * \brief Entry point class for large integer usage
24  */
25 #ifndef _GATB_CORE_TOOLS_MATH_INTEGER_HPP_
26 #define _GATB_CORE_TOOLS_MATH_INTEGER_HPP_
27 
28 /********************************************************************************/
29 #include "LargeInt.hpp"
30 #include "Model.hpp"
31 #include <boost/variant.hpp>
32 
33 /********************************************************************************/
34 namespace DeBruijn {
35 /********************************************************************************/
36 
37 /** \brief Class for large integers calculus
38  *
39  * The IntegerTemplate is implemented as a boost variant, which means that it can act like T1, T2, T3 or T4 type
40  * according to the configuration.
41  *
42  * The IntegerTemplate should be specialized with 4 different LargeInt implementation
43  * classes.
44  *
45  * All the methods are implemented through a boost variant visitor.
46  *
47  * According to the INTEGER_KIND compilation flag, we define the Integer class
48  * as an alias of one from several possible implementations.
49  *
50  * Note that we have 2 possible native implementations (NativeInt64 and NativeInt128)
51  * that rely on native types uint64_t and __uint128_t.
52  *
53  * For larger integer, a multi-precision LargeInt is used.
54  *
55  * From the user point of view, [s]he has just to include this file and use the Integer
56  * class.
57  *
58  */
59 template<typename T1, typename T2, typename T3, typename T4, typename T5>
61 {
62 private:
63 
64  typedef boost::variant<T1,T2,T3,T4,T5> Type;
66 
67  Type& operator *() { return v; }
68  const Type& operator *() const { return v; }
69 
70 public:
71 
72  IntegerTemplate() : v(T4(0)) {}
73 
74  static int MaxKmer() { return 32*PREC_5; }
75 
76  IntegerTemplate(int kmer_len, uint64_t n) {
77  int p = (kmer_len+31)/32;
78  if(p <= PREC_1) v = T1(n);
79  else if(p <= PREC_2) v = T2(n);
80  else if(p <= PREC_3) v = T3(n);
81  else if(p <= PREC_4) v = T4(n);
82  else if(p <= PREC_5) v = T5(n);
83  else { std::cerr << "Not supported kmer length in Integer initialization"; exit(1); }
84  }
85 
87  int p = (kmer.size()+31)/32;
88  if(p <= PREC_1) v = T1(kmer);
89  else if(p <= PREC_2) v = T2(kmer);
90  else if(p <= PREC_3) v = T3(kmer);
91  else if(p <= PREC_4) v = T4(kmer);
92  else if(p <= PREC_5) v = T5(kmer);
93  else { std::cerr << "Not supported kmer length in Integer initialization"; exit(1); }
94  }
95 
96  IntegerTemplate(const std::string::const_iterator& a, const std::string::const_iterator& b) {
97  int p = (b-a+31)/32;
98  if(p <= PREC_1) v = T1(a, b);
99  else if(p <= PREC_2) v = T2(a, b);
100  else if(p <= PREC_3) v = T3(a, b);
101  else if(p <= PREC_4) v = T4(a, b);
102  else if(p <= PREC_5) v = T5(a, b);
103  else { std::cerr << "Not supported kmer length in Integer initialization"; exit(1); }
104  }
105 
106  /**Construct from a different size IntegerTemplate
107  Will clip (or add) extra nucs on the LEFT of the string
108  */
109  /* !!!!!!!! has to be fixed for unused 8-byte words !!!!!!!!!!!!!!!!!!!!
110  IntegerTemplate(IntegerTemplate other, int kmer_len) : IntegerTemplate(kmer_len, 0) { // construct correct type
111  boost::apply_visitor(cast_from_other(kmer_len), v, other.v);
112  }
113  */
114 
115  /** Copy constructor. Relies on the copy constructor of boost variant
116  * \param[in] t : the object to be used for initialization
117  */
118  template<typename T> explicit IntegerTemplate (const T& t) : v (t) {}
119 
120  /** Affectation operator. Relies on the affectation operator of boost variant
121  * \param[in] t : object to be copied
122  * \return the current object.
123  */
124  template<typename T>
126  {
127  v = t;
128  return *this;
129  }
130 
131  /** Get the name of the class used by the variant (ie. one of the Ti template class parameters)
132  * \return the class name.
133  */
134  const char* getName () const { return boost::apply_visitor (Integer_name(), *(*this)); }
135 
136  /** Get the size of an instance of the class used by the variant (ie. one of the Ti template class parameters)
137  * \return the size of an object (in bits).
138  */
139  const size_t getSize () const { return boost::apply_visitor (Integer_size(), *(*this)); }
140 
141  /** Operator +
142  * \param[in] a : first operand
143  * \param[in] b : second operand
144  * \return sum of the two operands.
145  */
146  inline friend IntegerTemplate operator+ (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_plus(), *a, *b); }
147 
148  /** Operator -
149  * \param[in] a : first operand
150  * \param[in] b : second operand
151  * \return substraction of the two operands.
152  */
153  inline friend IntegerTemplate operator- (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_minus(), *a, *b); }
154 
155  /** Operator |
156  * \param[in] a : first operand
157  * \param[in] b : second operand
158  * \return 'or' of the two operands.
159  */
160  inline friend IntegerTemplate operator| (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_or(), *a, *b); }
161 
162  /** Operator ^
163  * \param[in] a : first operand
164  * \param[in] b : second operand
165  * \return 'xor' of the two operands.
166  */
167  inline friend IntegerTemplate operator^ (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_xor(), *a, *b); }
168 
169  /** Operator &
170  * \param[in] a : first operand
171  * \param[in] b : second operand
172  * \return 'and' of the two operands.
173  */
174  inline friend IntegerTemplate operator& (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_and(), *a, *b); }
175 
176  /** Operator ~
177  * \param[in] a : operand
178  * \return negation of the operand
179  */
180  inline friend IntegerTemplate operator~ (const IntegerTemplate& a) { Integer_compl v; return boost::apply_visitor (v, *a); }
181 
182  /** Operator ==
183  * \param[in] a : first operand
184  * \param[in] b : second operand
185  * \return equality of the two operands.
186  */
187  inline friend bool operator== (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_equals(), *a, *b); }
188 
189  /** Operator !=
190  * \param[in] a : first operand
191  * \param[in] b : second operand
192  * \return inequality of the two operands.
193  */
194  inline friend bool operator!= (const IntegerTemplate& a, const IntegerTemplate& b) { return ! (*a==*b); }
195 
196  /** Operator <
197  * \param[in] a : first operand
198  * \param[in] b : second operand
199  * \return '<' of the two operands.
200  */
201  inline friend bool operator< (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_less(), *a, *b); }
202 
203  /** Operator <=
204  * \param[in] a : first operand
205  * \param[in] b : second operand
206  * \return '<=' of the two operands.
207  */
208  inline friend bool operator<= (const IntegerTemplate& a, const IntegerTemplate& b) { return boost::apply_visitor (Integer_lesseq(), *a, *b); }
209 
210  /** Operator *
211  * \param[in] a : first operand
212  * \param[in] c : second operand
213  * \return multiplication of the two operands.
214  */
215  inline friend IntegerTemplate operator* (const IntegerTemplate& a, const int& c) { return boost::apply_visitor (Integer_mult(c), *a); }
216 
217  /** Operator /
218  * \param[in] a : first operand
219  * \param[in] c : second operand
220  * \return division of the two operands.
221  */
222  inline friend IntegerTemplate operator/ (const IntegerTemplate& a, const u_int32_t& c) { return boost::apply_visitor (Integer_div(c), *a); }
223 
224  /** Operator %
225  * \param[in] a : first operand
226  * \param[in] c : second operand
227  * \return modulo of the two operands.
228  */
229  inline friend u_int32_t operator% (const IntegerTemplate& a, const u_int32_t& c) { return boost::apply_visitor (Integer_mod(c), *a); }
230 
231  /** Operator >>
232  * \param[in] a : first operand
233  * \param[in] c : second operand
234  * \return right shift of the two operands.
235  */
236  inline friend IntegerTemplate operator>> (const IntegerTemplate& a, const int& c) { return boost::apply_visitor (Integer_shiftLeft(c), *a); }
237 
238  /** Operator <<
239  * \param[in] a : first operand
240  * \param[in] c : second operand
241  * \return left shift of the two operands.
242  */
243  inline friend IntegerTemplate operator<< (const IntegerTemplate& a, const int& c) { return boost::apply_visitor (Integer_shiftRight(c), *a); }
244 
245  /** Operator +=
246  * \param[in] a : first operand
247  * \return addition and affectation.
248  */
249  void operator+= (const IntegerTemplate& a) { boost::apply_visitor (Integer_plusaffect(), *(*this), *a); }
250 
251  /** Operator ^=
252  * \param[in] a : first operand
253  * \return xor and affectation.
254  */
255  void operator^= (const IntegerTemplate& a) { boost::apply_visitor (Integer_xoraffect(), *(*this), *a); }
256 
257  /** Operator[] access the ith nucleotide in the given integer. For instance a[4] get the 5th nucleotide of
258  * a kmer encoded as an Integer object.
259  * \param[in] idx : index of the nucleotide to be retrieved
260  * \return the nucleotide value as follow: A=0, C=1, T=2 and G=3
261  */
262  u_int8_t operator[] (size_t idx) const { return boost::apply_visitor (Integer_value_at(idx), *(*this)); }
263 
264  /** Get the reverse complement of a kmer encoded as an IntegerTemplate object. Note that the kmer size must be known.
265  * \param[in] a : kmer value to be reversed-complemented
266  * \param[in] sizeKmer : size of the kmer
267  * \return the reverse complement kmer as a IntegerTemplate value
268  */
269  friend IntegerTemplate revcomp (const IntegerTemplate& a, size_t sizeKmer) { return boost::apply_visitor (Integer_revomp(sizeKmer), *a); }
270 
271  /** Get an ASCII string representation of a kmer encoded as a IntegerTemplate object
272  * \param[in] sizeKmer : size of the kmer
273  * \return the ASCII representation of the kmer.
274  */
275  std::string toString (size_t sizeKmer) const { return boost::apply_visitor (Integer_toString(sizeKmer), *(*this)); }
276 
277  /** Output stream operator for the IntegerTemplate class
278  * \param[in] s : the output stream to be used.
279  * \param[in] a : the object to output
280  * \return the modified output stream.
281  */
282  friend std::ostream & operator<<(std::ostream & s, const IntegerTemplate& a) { s << *a; return s; }
283 
284  /** Get the value of the IntegerTemplate object as a U type, U being one of the T1,T2,T3,T4
285  * template class parameters. This method can be seen as a converter from the IntegerTemplate class
286  * to a specific U type (given as a template parameter of this method).
287  * \return the converted value as a U type.
288  */
289  template<typename U>
290  const U& get () const { return * boost::get<U>(&v); }
291 
292  /** Get pointer to the actual data - used for EMPHF */
293  void* getPointer() { return boost::apply_visitor (Pointer(), v); }
294 
295  /** Get a hash value on 64 bits for a given IntegerTemplate object.
296  * \param[in] a : the integer value
297  * \return the hash value on 64 bits.
298  */
299  u_int64_t oahash() const { return boost::apply_visitor (Integer_oahash(), *(*this)); }
300 
301 private:
302 
303  struct cast_from_other : public boost::static_visitor<> {
304  cast_from_other(int kl) : kmer_len(kl) {}
305  template<typename T, typename U> void operator() (T& newl, U& origl) const {
306  int orig_precision = origl.getSize()/64;
307  uint64_t* orig_guts = origl.GetGuts();
308 
309  int new_precision = newl.getSize()/64;
310  uint64_t* new_guts = newl.GetGuts();
311 
312  std::copy(orig_guts, orig_guts+std::min(orig_precision, new_precision), new_guts);
313  int partial_part_bits = 2*(kmer_len%32);
314  if(partial_part_bits > 0) {
315  uint64_t mask = (uint64_t(1) << partial_part_bits) - 1;
316  new_guts[new_precision-1] &= mask;
317  }
318  }
319  int kmer_len;
320  };
321  struct Integer_oahash : public boost::static_visitor<u_int64_t> {
322  template<typename T> u_int64_t operator() (const T& a) const { return a.oahash(); }};
323 
324  struct Pointer : public boost::static_visitor<void*> {
325  template<typename T> void* operator() (T& a) const { return &a; }};
326 
327  struct Integer_name : public boost::static_visitor<const char*> {
328  template<typename T> const char* operator() (const T& a) const { return a.getName(); }};
329 
330  struct Integer_size : public boost::static_visitor<const size_t> {
331  template<typename T> const size_t operator() (const T& a) const { return a.getSize(); }};
332 
333  struct Integer_plus : public boost::static_visitor<IntegerTemplate> {
334  template<typename T> IntegerTemplate operator() (const T& a, const T& b) const { return IntegerTemplate(a + b); }
335  template<typename T, typename U> IntegerTemplate operator() (const T& a, const U& b) const { return IntegerTemplate(); }
336  };
337 
338  struct Integer_minus : public boost::static_visitor<IntegerTemplate> {
339  template<typename T> IntegerTemplate operator() (const T& a, const T& b) const { return IntegerTemplate(a - b); }
340  template<typename T, typename U> IntegerTemplate operator() (const T& a, const U& b) const { return IntegerTemplate(); }
341  };
342 
343  struct Integer_or : public boost::static_visitor<IntegerTemplate> {
344  template<typename T> IntegerTemplate operator() (const T& a, const T& b) const { return IntegerTemplate(a | b); }
345  template<typename T, typename U> IntegerTemplate operator() (const T& a, const U& b) const { return IntegerTemplate(); }
346  };
347 
348  struct Integer_xor : public boost::static_visitor<IntegerTemplate> {
349  template<typename T> IntegerTemplate operator() (const T& a, const T& b) const { return IntegerTemplate(a ^ b); }
350  template<typename T, typename U> IntegerTemplate operator() (const T& a, const U& b) const { return IntegerTemplate(); }
351  };
352 
353  struct Integer_and : public boost::static_visitor<IntegerTemplate> {
354  template<typename T> IntegerTemplate operator() (const T& a, const T& b) const { return IntegerTemplate(a & b); }
355  template<typename T, typename U> IntegerTemplate operator() (const T& a, const U& b) const { return IntegerTemplate(); }
356  };
357 
358  struct Integer_less : public boost::static_visitor<bool> {
359  template<typename T> bool operator() (const T& a, const T& b) const { return a < b; }
360  template<typename T, typename U> bool operator() (const T& a, const U& b) const { return false; }
361  };
362 
363  struct Integer_lesseq : public boost::static_visitor<bool> {
364  template<typename T> bool operator() (const T& a, const T& b) const { return a <= b; }
365  template<typename T, typename U> bool operator() (const T& a, const U& b) const { return false; }
366  };
367 
368  struct Integer_equals : public boost::static_visitor<bool> {
369  template<typename T> bool operator() (const T& a, const T& b) const { return a == b; }
370  template<typename T, typename U> bool operator() (const T& a, const U& b) const { return false; }
371  };
372 
373  struct Integer_plusaffect : public boost::static_visitor<> {
374  template<typename T> void operator() ( T& a, const T& b) const { a += b; }
375  template<typename T, typename U> void operator() ( T& a, const U& b) const { }
376  };
377 
378  struct Integer_xoraffect : public boost::static_visitor<> {
379  template<typename T> void operator() ( T& a, const T& b) const { a ^= b; }
380  template<typename T, typename U> void operator() ( T& a, const U& b) const { }
381  };
382 
383  struct Integer_compl : public boost::static_visitor<IntegerTemplate> {
384  template<typename T> IntegerTemplate operator() (const T& a) { return IntegerTemplate(~a); }};
385 
386  template<typename Result, typename Arg>
387  struct Visitor : public boost::static_visitor<Result>
388  {
389  Visitor (Arg a=Arg()) : arg(a) {}
390  Arg arg;
391  };
392 
393  struct Integer_mult : public Visitor<IntegerTemplate,const int> {
394  Integer_mult (const int& c) : Visitor<IntegerTemplate,const int>(c) {}
395  template<typename T> IntegerTemplate operator() (const T& a) const { return IntegerTemplate(a*this->arg); }};
396 
397  struct Integer_div : public Visitor<IntegerTemplate,const u_int32_t> {
398  Integer_div (const u_int32_t& c) : Visitor<IntegerTemplate,const u_int32_t>(c) {}
399  template<typename T> IntegerTemplate operator() (const T& a) const { return IntegerTemplate(a/this->arg); }};
400 
401  struct Integer_mod : public Visitor<u_int32_t,const u_int32_t> {
402  Integer_mod (const u_int32_t& c) : Visitor<u_int32_t,const u_int32_t>(c) {}
403  template<typename T> u_int32_t operator() (const T& a) const { return (a%this->arg); }};
404 
405  struct Integer_shiftLeft : public Visitor<IntegerTemplate,const int> {
407  template<typename T> IntegerTemplate operator() (const T& a) const { return IntegerTemplate (a >> this->arg); }};
408 
409  struct Integer_shiftRight : public Visitor<IntegerTemplate,const int> {
411  template<typename T> IntegerTemplate operator() (const T& a) const { return IntegerTemplate (a << this->arg); }};
412 
413  struct Integer_revomp : public Visitor<IntegerTemplate,size_t> {
414  Integer_revomp (const size_t& c) : Visitor<IntegerTemplate,size_t>(c) {}
415  template<typename T> IntegerTemplate operator() (const T& a) const { return IntegerTemplate (revcomp(a,this->arg)); }};
416 
417  struct Integer_value_at : public Visitor<u_int8_t,size_t> {
418  Integer_value_at (size_t idx) : Visitor<u_int8_t,size_t>(idx) {}
419  template<typename T> u_int8_t operator() (const T& a) const { return a[this->arg]; }};
420 
421  struct Integer_toString : public Visitor<std::string,size_t> {
422  Integer_toString (size_t c) : Visitor<std::string,size_t>(c) {}
423  template<typename T> std::string operator() (const T& a) const { return a.toString(this->arg); }};
424 };
425 
426 /********************************************************************************/
427 
428 #define INTEGER_TYPES LargeInt<PREC_1>,LargeInt<PREC_2>,LargeInt<PREC_3>,LargeInt<PREC_4>,LargeInt<PREC_5>
429 
431 
432 /********************************************************************************/
433 };
434 /********************************************************************************/
435 
436 #endif /* _GATB_CORE_TOOLS_MATH_INTEGER_HPP_ */
Class that manages large integers.
ncbi::TMaskedQueryRegions mask
Class for large integers calculus.
Definition: Integer.hpp:61
const char * getName() const
Get the name of the class used by the variant (ie.
Definition: Integer.hpp:134
const U & get() const
Get the value of the IntegerTemplate object as a U type, U being one of the T1,T2,...
Definition: Integer.hpp:290
friend std::ostream & operator<<(std::ostream &s, const IntegerTemplate &a)
Output stream operator for the IntegerTemplate class.
Definition: Integer.hpp:282
u_int8_t operator[](size_t idx) const
Operator[] access the ith nucleotide in the given integer.
Definition: Integer.hpp:262
friend bool operator<(const IntegerTemplate &a, const IntegerTemplate &b)
Operator <.
Definition: Integer.hpp:201
friend bool operator!=(const IntegerTemplate &a, const IntegerTemplate &b)
Operator !=.
Definition: Integer.hpp:194
friend IntegerTemplate revcomp(const IntegerTemplate &a, size_t sizeKmer)
Get the reverse complement of a kmer encoded as an IntegerTemplate object.
Definition: Integer.hpp:269
void operator^=(const IntegerTemplate &a)
Operator ^=.
Definition: Integer.hpp:255
IntegerTemplate(const T &t)
Construct from a different size IntegerTemplate Will clip (or add) extra nucs on the LEFT of the stri...
Definition: Integer.hpp:118
friend IntegerTemplate operator&(const IntegerTemplate &a, const IntegerTemplate &b)
Operator &.
Definition: Integer.hpp:174
friend IntegerTemplate operator^(const IntegerTemplate &a, const IntegerTemplate &b)
Operator ^.
Definition: Integer.hpp:167
friend bool operator==(const IntegerTemplate &a, const IntegerTemplate &b)
Operator ==.
Definition: Integer.hpp:187
friend IntegerTemplate operator+(const IntegerTemplate &a, const IntegerTemplate &b)
Operator +.
Definition: Integer.hpp:146
const size_t getSize() const
Get the size of an instance of the class used by the variant (ie.
Definition: Integer.hpp:139
IntegerTemplate(int kmer_len, uint64_t n)
Definition: Integer.hpp:76
void operator+=(const IntegerTemplate &a)
Operator +=.
Definition: Integer.hpp:249
friend IntegerTemplate operator/(const IntegerTemplate &a, const u_int32_t &c)
Operator /.
Definition: Integer.hpp:222
friend IntegerTemplate operator<<(const IntegerTemplate &a, const int &c)
Operator <<.
Definition: Integer.hpp:243
IntegerTemplate(const std::string::const_iterator &a, const std::string::const_iterator &b)
Definition: Integer.hpp:96
friend IntegerTemplate operator-(const IntegerTemplate &a, const IntegerTemplate &b)
Operator -.
Definition: Integer.hpp:153
friend bool operator<=(const IntegerTemplate &a, const IntegerTemplate &b)
Operator <=.
Definition: Integer.hpp:208
static int MaxKmer()
Definition: Integer.hpp:74
IntegerTemplate(const std::string &kmer)
Definition: Integer.hpp:86
IntegerTemplate & operator=(const T &t)
Affectation operator.
Definition: Integer.hpp:125
friend IntegerTemplate operator|(const IntegerTemplate &a, const IntegerTemplate &b)
Operator |.
Definition: Integer.hpp:160
friend u_int32_t operator%(const IntegerTemplate &a, const u_int32_t &c)
Operator %.
Definition: Integer.hpp:229
friend IntegerTemplate operator~(const IntegerTemplate &a)
Operator ~.
Definition: Integer.hpp:180
boost::variant< T1, T2, T3, T4, T5 > Type
Definition: Integer.hpp:64
friend IntegerTemplate operator>>(const IntegerTemplate &a, const int &c)
Operator >>
Definition: Integer.hpp:236
std::string toString(size_t sizeKmer) const
Get an ASCII string representation of a kmer encoded as a IntegerTemplate object.
Definition: Integer.hpp:275
void * getPointer()
Get pointer to the actual data - used for EMPHF.
Definition: Integer.hpp:293
u_int64_t oahash() const
Get a hash value on 64 bits for a given IntegerTemplate object.
Definition: Integer.hpp:299
#define PREC_1
Definition: config.hpp:22
#define PREC_5
Definition: config.hpp:26
#define PREC_4
Definition: config.hpp:25
#define PREC_3
Definition: config.hpp:24
#define PREC_2
Definition: config.hpp:23
#define T(s)
Definition: common.h:230
string
Definition: cgiapp.hpp:687
#define Pointer
Definition: ncbistd.hpp:114
unsigned int
A callback function used to compare two keys in a database.
Definition: types.hpp:1210
exit(2)
yy_size_t n
IntegerTemplate< LargeInt< 1 >, LargeInt< 2 >, LargeInt< 4 >, LargeInt< 8 >, LargeInt< 16 > > TKmer
Definition: Integer.hpp:430
unsigned int a
Definition: ncbi_localip.c:102
EIPRangeType t
Definition: ncbi_localip.c:101
T min(T x_, T y_)
void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)
Definition: njn_matrix.hpp:613
unsigned __int64 uint64_t
Definition: stdint.h:136
IntegerTemplate operator()(const T &a, const T &b) const
Definition: Integer.hpp:354
IntegerTemplate operator()(const T &a)
Definition: Integer.hpp:384
IntegerTemplate operator()(const T &a) const
Definition: Integer.hpp:399
bool operator()(const T &a, const T &b) const
Definition: Integer.hpp:369
bool operator()(const T &a, const T &b) const
Definition: Integer.hpp:359
bool operator()(const T &a, const T &b) const
Definition: Integer.hpp:364
IntegerTemplate operator()(const T &a, const T &b) const
Definition: Integer.hpp:339
u_int32_t operator()(const T &a) const
Definition: Integer.hpp:403
IntegerTemplate operator()(const T &a) const
Definition: Integer.hpp:395
const char * operator()(const T &a) const
Definition: Integer.hpp:328
u_int64_t operator()(const T &a) const
Definition: Integer.hpp:322
IntegerTemplate operator()(const T &a, const T &b) const
Definition: Integer.hpp:344
IntegerTemplate operator()(const T &a, const T &b) const
Definition: Integer.hpp:334
void operator()(T &a, const T &b) const
Definition: Integer.hpp:374
IntegerTemplate operator()(const T &a) const
Definition: Integer.hpp:415
IntegerTemplate operator()(const T &a) const
Definition: Integer.hpp:407
IntegerTemplate operator()(const T &a) const
Definition: Integer.hpp:411
const size_t operator()(const T &a) const
Definition: Integer.hpp:331
std::string operator()(const T &a) const
Definition: Integer.hpp:423
u_int8_t operator()(const T &a) const
Definition: Integer.hpp:419
IntegerTemplate operator()(const T &a, const T &b) const
Definition: Integer.hpp:349
void operator()(T &a, const T &b) const
Definition: Integer.hpp:379
void * operator()(T &a) const
Definition: Integer.hpp:325
void operator()(T &newl, U &origl) const
Definition: Integer.hpp:305
#define const
Definition: zconf.h:230
Modified on Sat Dec 02 09:23:26 2023 by modify_doxy.py rev. 669887