This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/5406: --pedantic-error fails things --pedantic likes
- From: Marc Mengel <mengel at bel-kwinth dot fnal dot gov>
- To: gcc-gnats at gcc dot gnu dot org
- Date: Wed, 16 Jan 2002 15:00:24 -0600
- Subject: c++/5406: --pedantic-error fails things --pedantic likes
>Number: 5406
>Category: c++
>Synopsis: --pedantic-error fails things --pedantic likes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Jan 16 13:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Marc W. Mengel
>Release: 3.0.1
>Organization:
Fermi National Accelerator Laboratory
>Environment:
Linux Red Hat 6.2 specific
System: Linux bldlinux61.fnal.gov 2.2.16-3smp #1 SMP Mon Jun 19 19:00:35 EDT 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.0.1/configure --prefix=/tmp/build-gcc-v3_0_1 --disable-shared
>Description:
On some C++ code compiling with "-O -pedantic-errors" complains about
<math.h> macro instantiations in <cmath>, wheres with -O -pedantic
no errors or warnings are generated.
Errors are of the form:
/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h: In
function `int __gnu_cxx::__capture_isgreater(_Tp, _Tp)':
/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h:534: ISO C++ forbids braced-groups within expressions
where the line in question is a macro instantiation of a macro like:
#define greaterequal(x, y) \
(__extension__ \
({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
!isunordered (__x, __y) && __x >= __y; }))
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
>To-Repeat:
Compile the following, first with:
g++ -c -O --pedantic
Then with:
g++ -c -O --pedantic-errors
The latter gives errors even though the former gives no warnings.
I have been unable to find a simpler case that reproduces this.
The same compiler built on Red Hat 7.1 on an otherwise identical
system does *not* exhibit this behavior.
Preprocessor input:
- - - - - - - - - - - - - cut here - - - - - - - - - - - - - - - - -
#include <cmath>
// $Id: ParticleID.hh,v 1.2 2001/11/14 01:31:10 garren Exp $
// ----------------------------------------------------------------------
//
// ParticleID.hh
//
// various utilities to extract information from the particle ID
//
// In the standard numbering scheme, the PID digits (base 10) are:
// +/- n nr nl nq1 nq2 nq3 nj
// It is expected that any 7 digit number used as a PID will adhere to
// the Monte Carlo numbering scheme documented by the PDG.
// Note that many "new" particles not explicitly defined already
// can be expressed within this numbering scheme.
//
// ----------------------------------------------------------------------
#include <algorithm> // swap()
namespace HepPDT {
// convert from 2J+1 to the actual spin value
double spinitod( int js );
int spindtoi( double spin );
// translate between generator ID's and standard numbering scheme
int translatePythiatoPDT( const int pythiaID );
int translateIsajettoPDT( const int isajetID );
int translateHerwigtoPDT( const int herwigID);
int translateQQtoPDT( const int qqID);
int translateGeanttoPDT( const int geantID);
int translatePDGtabletoPDT( const int pdgID);
int translateEvtGentoPDT( const int evtGenID );
int translatePDTtoPythia( const int pid );
int translatePDTtoIsajet( const int pid );
int translatePDTtoHerwig( const int pid );
int translatePDTtoQQ( const int pid );
int translatePDTtoGeant( const int pid );
int translatePDTtoPDGtable( const int pid );
int translatePDTtoEvtGen( const int pid );
// PID digits (base 10) are: n nr nl nq1 nq2 nq3 nj
// the location enum provides a convenient index into the PID
enum location { nj=1, nq3, nq2, nq1, nl, nr, n, n8, n9, n10 };
// constituent quarks
struct Quarks {
// -- constructors
//
Quarks( ) : nq1(0), nq2(0), nq3(0) {}
Quarks( short q1, short q2, short q3) : nq1(q1), nq2(q2), nq3(q3) {}
// -- data members
//
short nq1;
short nq2;
short nq3;
};
class ParticleID {
public:
// --- birth/death:
//
inline ParticleID( int pid = 0 );
// --- copying:
//
inline ParticleID( const ParticleID & orig );
inline ParticleID& operator=( const ParticleID & );
inline void swap( ParticleID & other );
inline bool operator < ( ParticleID const & other ) const;
inline bool operator == ( ParticleID const & other ) const;
// --- accessors:
//
int pid( ) const { return itsPID; }
inline int abspid( ) const;
// --- boolean methods:
//
bool isValid( ) const;
bool isMeson( ) const;
bool isBaryon( ) const;
bool isDiQuark( ) const;
bool isHadron( ) const;
bool isLepton( ) const;
bool isNucleus( ) const;
//
inline bool hasUp( ) const;
inline bool hasDown( ) const;
inline bool hasStrange( ) const;
inline bool hasCharm( ) const;
inline bool hasBottom( ) const;
inline bool hasTop( ) const;
// jSpin returns 2J+1, where J is the total spin
int jSpin( ) const;
// sSpin returns 2S+1, where S is the spin
int sSpin( ) const;
// lSpin returns 2L+1, where L is the orbital angular momentum
int lSpin( ) const;
// return the first two digits if this is a "fundamental" particle
int fundamentalID( ) const;
// returns everything beyond the 7th digit (e.g. outside the numbering scheme)
int extraBits( ) const;
// returns a list of 3 constituent quarks
Quarks quarks( ) const;
// this is mostly for use by functions like addPDGParticles that have to
// figure out the charge from the PID
int threeCharge( ) const;
// if this is a nucleus, get A and Z
int A( ) const;
int Z( ) const;
// digit returns the digit at a named location in the PID
unsigned short digit(location) const;
private:
int itsPID;
}; // ParticleID
inline
void swap( ParticleID & first, ParticleID & second ) { first.swap( second ); }
} // HepPDT
// $Id: ParticleID.icc,v 1.2 2001/11/14 01:31:11 garren Exp $
// ----------------------------------------------------------------------
//
// ParticleID.icc
//
// ----------------------------------------------------------------------
namespace HepPDT {
ParticleID::ParticleID( int pid )
: itsPID ( pid )
{ ; }
ParticleID::ParticleID( const ParticleID & orig )
: itsPID ( orig.itsPID )
{ ; }
ParticleID& ParticleID::operator=( const ParticleID & rhs )
{
ParticleID temp( rhs );
swap( temp );
return *this;
}
void ParticleID::swap( ParticleID & other )
{
std::swap( itsPID, other.itsPID );
}
bool ParticleID::operator < ( ParticleID const & other ) const
{
return itsPID < other.itsPID;
}
bool ParticleID::operator == ( ParticleID const & other ) const
{
return itsPID == other.itsPID;
}
int ParticleID::abspid( ) const
{
return (itsPID < 0) ? -itsPID : itsPID;
}
bool ParticleID::hasUp( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 2 || digit(nq2) == 2 || digit(nq1) == 2 ) { return true; }
return false;
}
bool ParticleID::hasDown( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 1 || digit(nq2) == 1 || digit(nq1) == 1 ) { return true; }
return false;
}
bool ParticleID::hasStrange( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 3 || digit(nq2) == 3 || digit(nq1) == 3 ) { return true; }
return false;
}
bool ParticleID::hasCharm( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 4 || digit(nq2) == 4 || digit(nq1) == 4 ) { return true; }
return false;
}
bool ParticleID::hasBottom( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 5 || digit(nq2) == 5 || digit(nq1) == 5 ) { return true; }
return false;
}
bool ParticleID::hasTop( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 6 || digit(nq2) == 6 || digit(nq1) == 6 ) { return true; }
return false;
}
} // HepPDT
// $Id: digit.cc,v 1.1 2001/11/09 15:24:14 mf Exp $
// ----------------------------------------------------------------------
//
// digit.cc
//
// split the PID into constituent integers
//
// ----------------------------------------------------------------------
namespace HepPDT {
unsigned short ParticleID::digit( location loc ) const
{
// PID digits (base 10) are: n nr nl nq1 nq2 nq3 nj
// the location enum provides a convenient index into the PID
int numerator = (int) std::pow(10.0,(loc-1));
return (abspid()/numerator)%10;
}
} // HepPDT
- - - - - - - - - - - - - cut here - - - - - - - - - - - - - - - - -
Preprocessor output:
- - - - - - - - - - - - - cut here - - - - - - - - - - - - - - - - -
# 2 "foo.cc"
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cmath" 1 3
# 31 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cmath" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 34 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/os_defines.h" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/os_defines.h" 3
# 1 "/usr/include/features.h" 1 3
# 250 "/usr/include/features.h" 3
# 1 "/usr/include/sys/cdefs.h" 1 3
# 251 "/usr/include/features.h" 2 3
# 278 "/usr/include/features.h" 3
# 1 "/usr/include/gnu/stubs.h" 1 3
# 279 "/usr/include/features.h" 2 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/os_defines.h" 2 3
# 35 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/limits.h" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 2 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 2 3
# 40 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 3
# 1 "/usr/include/math.h" 1 3
# 27 "/usr/include/math.h" 3
# 1 "/usr/include/features.h" 1 3
# 28 "/usr/include/math.h" 2 3
extern "C" {
# 1 "/usr/include/bits/huge_val.h" 1 3
# 25 "/usr/include/bits/huge_val.h" 3
# 1 "/usr/include/features.h" 1 3
# 26 "/usr/include/bits/huge_val.h" 2 3
# 34 "/usr/include/math.h" 2 3
# 1 "/usr/include/bits/nan.h" 1 3
# 38 "/usr/include/math.h" 2 3
# 1 "/usr/include/bits/mathdef.h" 1 3
# 29 "/usr/include/bits/mathdef.h" 3
typedef long double float_t;
typedef long double double_t;
# 41 "/usr/include/math.h" 2 3
# 63 "/usr/include/math.h" 3
# 1 "/usr/include/bits/mathcalls.h" 1 3
# 54 "/usr/include/bits/mathcalls.h" 3
extern double acos (double __x); extern double __acos (double __x);
extern double asin (double __x); extern double __asin (double __x);
extern double atan (double __x); extern double __atan (double __x);
extern double atan2 (double __y, double __x); extern double __atan2 (double __y, double __x);
extern double cos (double __x); extern double __cos (double __x);
extern double sin (double __x); extern double __sin (double __x);
extern double tan (double __x); extern double __tan (double __x);
extern void sincos (double __x, double *__sinx, double *__cosx); extern void __sincos (double __x, double *__sinx, double *__cosx);
extern double cosh (double __x); extern double __cosh (double __x);
extern double sinh (double __x); extern double __sinh (double __x);
extern double tanh (double __x); extern double __tanh (double __x);
extern double acosh (double __x); extern double __acosh (double __x);
extern double asinh (double __x); extern double __asinh (double __x);
extern double atanh (double __x); extern double __atanh (double __x);
extern double exp (double __x); extern double __exp (double __x);
extern double exp10 (double __x); extern double __exp10 (double __x);
extern double pow10 (double __x); extern double __pow10 (double __x);
extern double frexp (double __x, int *__exponent); extern double __frexp (double __x, int *__exponent);
extern double ldexp (double __x, int __exponent); extern double __ldexp (double __x, int __exponent);
extern double log (double __x); extern double __log (double __x);
extern double log10 (double __x); extern double __log10 (double __x);
extern double modf (double __x, double *__iptr); extern double __modf (double __x, double *__iptr);
extern double expm1 (double __x); extern double __expm1 (double __x);
extern double log1p (double __x); extern double __log1p (double __x);
extern double logb (double __x); extern double __logb (double __x);
extern double exp2 (double __x); extern double __exp2 (double __x);
extern double log2 (double __x); extern double __log2 (double __x);
extern double pow (double __x, double __y); extern double __pow (double __x, double __y);
extern double sqrt (double __x); extern double __sqrt (double __x);
extern double hypot (double __x, double __y); extern double __hypot (double __x, double __y);
extern double cbrt (double __x); extern double __cbrt (double __x);
extern double ceil (double __x); extern double __ceil (double __x);
extern double fabs (double __x) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__const__));
extern double floor (double __x); extern double __floor (double __x);
extern double fmod (double __x, double __y); extern double __fmod (double __x, double __y);
extern int __isinf (double __value) __attribute__ ((__const__));
extern int __finite (double __value) __attribute__ ((__const__));
extern int isinf (double __value) __attribute__ ((__const__));
extern int finite (double __value) __attribute__ ((__const__));
extern double infnan (int __error) __attribute__ ((__const__)); extern double __infnan (int __error) __attribute__ ((__const__));
extern double drem (double __x, double __y); extern double __drem (double __x, double __y);
extern double significand (double __x); extern double __significand (double __x);
extern double copysign (double __x, double __y) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__const__));
extern double nan (__const char *__tagb) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__const__));
extern int __isnan (double __value) __attribute__ ((__const__));
extern int isnan (double __value) __attribute__ ((__const__));
extern double j0 (double); extern double __j0 (double);
extern double j1 (double); extern double __j1 (double);
extern double jn (int, double); extern double __jn (int, double);
extern double y0 (double); extern double __y0 (double);
extern double y1 (double); extern double __y1 (double);
extern double yn (int, double); extern double __yn (int, double);
extern double erf (double); extern double __erf (double);
extern double erfc (double); extern double __erfc (double);
extern double lgamma (double); extern double __lgamma (double);
extern double tgamma (double); extern double __tgamma (double);
extern double gamma (double); extern double __gamma (double);
extern double lgamma_r (double, int *__signgamp); extern double __lgamma_r (double, int *__signgamp);
extern double rint (double __x); extern double __rint (double __x);
extern double nextafter (double __x, double __y) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__const__));
extern double nexttoward (double __x, long double __y) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__const__));
extern double remainder (double __x, double __y); extern double __remainder (double __x, double __y);
extern double scalb (double __x, double __n); extern double __scalb (double __x, double __n);
extern double scalbn (double __x, int __n); extern double __scalbn (double __x, int __n);
extern int ilogb (double __x); extern int __ilogb (double __x);
extern double scalbln (double __x, long int __n); extern double __scalbln (double __x, long int __n);
extern double nearbyint (double __x); extern double __nearbyint (double __x);
extern double round (double __x); extern double __round (double __x);
extern double trunc (double __x) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__const__));
extern double remquo (double __x, double __y, int *__quo); extern double __remquo (double __x, double __y, int *__quo);
extern long int lrint (double __x); extern long int __lrint (double __x);
extern long long int llrint (double __x); extern long long int __llrint (double __x);
extern long int lround (double __x); extern long int __lround (double __x);
extern long long int llround (double __x); extern long long int __llround (double __x);
extern double fdim (double __x, double __y); extern double __fdim (double __x, double __y);
extern double fmax (double __x, double __y); extern double __fmax (double __x, double __y);
extern double fmin (double __x, double __y); extern double __fmin (double __x, double __y);
extern int __fpclassify (double __value)
__attribute__ ((__const__));
extern int __signbit (double __value)
__attribute__ ((__const__));
extern double fma (double __x, double __y, double __z); extern double __fma (double __x, double __y, double __z);
# 64 "/usr/include/math.h" 2 3
# 82 "/usr/include/math.h" 3
# 1 "/usr/include/bits/mathcalls.h" 1 3
# 54 "/usr/include/bits/mathcalls.h" 3
extern float acosf (float __x); extern float __acosf (float __x);
extern float asinf (float __x); extern float __asinf (float __x);
extern float atanf (float __x); extern float __atanf (float __x);
extern float atan2f (float __y, float __x); extern float __atan2f (float __y, float __x);
extern float cosf (float __x); extern float __cosf (float __x);
extern float sinf (float __x); extern float __sinf (float __x);
extern float tanf (float __x); extern float __tanf (float __x);
extern void sincosf (float __x, float *__sinx, float *__cosx); extern void __sincosf (float __x, float *__sinx, float *__cosx);
extern float coshf (float __x); extern float __coshf (float __x);
extern float sinhf (float __x); extern float __sinhf (float __x);
extern float tanhf (float __x); extern float __tanhf (float __x);
extern float acoshf (float __x); extern float __acoshf (float __x);
extern float asinhf (float __x); extern float __asinhf (float __x);
extern float atanhf (float __x); extern float __atanhf (float __x);
extern float expf (float __x); extern float __expf (float __x);
extern float exp10f (float __x); extern float __exp10f (float __x);
extern float pow10f (float __x); extern float __pow10f (float __x);
extern float frexpf (float __x, int *__exponent); extern float __frexpf (float __x, int *__exponent);
extern float ldexpf (float __x, int __exponent); extern float __ldexpf (float __x, int __exponent);
extern float logf (float __x); extern float __logf (float __x);
extern float log10f (float __x); extern float __log10f (float __x);
extern float modff (float __x, float *__iptr); extern float __modff (float __x, float *__iptr);
extern float expm1f (float __x); extern float __expm1f (float __x);
extern float log1pf (float __x); extern float __log1pf (float __x);
extern float logbf (float __x); extern float __logbf (float __x);
extern float exp2f (float __x); extern float __exp2f (float __x);
extern float log2f (float __x); extern float __log2f (float __x);
extern float powf (float __x, float __y); extern float __powf (float __x, float __y);
extern float sqrtf (float __x); extern float __sqrtf (float __x);
extern float hypotf (float __x, float __y); extern float __hypotf (float __x, float __y);
extern float cbrtf (float __x); extern float __cbrtf (float __x);
extern float ceilf (float __x); extern float __ceilf (float __x);
extern float fabsf (float __x) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__const__));
extern float floorf (float __x); extern float __floorf (float __x);
extern float fmodf (float __x, float __y); extern float __fmodf (float __x, float __y);
extern int __isinff (float __value) __attribute__ ((__const__));
extern int __finitef (float __value) __attribute__ ((__const__));
extern int isinff (float __value) __attribute__ ((__const__));
extern int finitef (float __value) __attribute__ ((__const__));
extern float infnanf (int __error) __attribute__ ((__const__)); extern float __infnanf (int __error) __attribute__ ((__const__));
extern float dremf (float __x, float __y); extern float __dremf (float __x, float __y);
extern float significandf (float __x); extern float __significandf (float __x);
extern float copysignf (float __x, float __y) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__const__));
extern float nanf (__const char *__tagb) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__const__));
extern int __isnanf (float __value) __attribute__ ((__const__));
extern int isnanf (float __value) __attribute__ ((__const__));
extern float j0f (float); extern float __j0f (float);
extern float j1f (float); extern float __j1f (float);
extern float jnf (int, float); extern float __jnf (int, float);
extern float y0f (float); extern float __y0f (float);
extern float y1f (float); extern float __y1f (float);
extern float ynf (int, float); extern float __ynf (int, float);
extern float erff (float); extern float __erff (float);
extern float erfcf (float); extern float __erfcf (float);
extern float lgammaf (float); extern float __lgammaf (float);
extern float tgammaf (float); extern float __tgammaf (float);
extern float gammaf (float); extern float __gammaf (float);
extern float lgammaf_r (float, int *__signgamp); extern float __lgammaf_r (float, int *__signgamp);
extern float rintf (float __x); extern float __rintf (float __x);
extern float nextafterf (float __x, float __y) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__const__));
extern float nexttowardf (float __x, long double __y) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__const__));
extern float remainderf (float __x, float __y); extern float __remainderf (float __x, float __y);
extern float scalbf (float __x, float __n); extern float __scalbf (float __x, float __n);
extern float scalbnf (float __x, int __n); extern float __scalbnf (float __x, int __n);
extern int ilogbf (float __x); extern int __ilogbf (float __x);
extern float scalblnf (float __x, long int __n); extern float __scalblnf (float __x, long int __n);
extern float nearbyintf (float __x); extern float __nearbyintf (float __x);
extern float roundf (float __x); extern float __roundf (float __x);
extern float truncf (float __x) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__const__));
extern float remquof (float __x, float __y, int *__quo); extern float __remquof (float __x, float __y, int *__quo);
extern long int lrintf (float __x); extern long int __lrintf (float __x);
extern long long int llrintf (float __x); extern long long int __llrintf (float __x);
extern long int lroundf (float __x); extern long int __lroundf (float __x);
extern long long int llroundf (float __x); extern long long int __llroundf (float __x);
extern float fdimf (float __x, float __y); extern float __fdimf (float __x, float __y);
extern float fmaxf (float __x, float __y); extern float __fmaxf (float __x, float __y);
extern float fminf (float __x, float __y); extern float __fminf (float __x, float __y);
extern int __fpclassifyf (float __value)
__attribute__ ((__const__));
extern int __signbitf (float __value)
__attribute__ ((__const__));
extern float fmaf (float __x, float __y, float __z); extern float __fmaf (float __x, float __y, float __z);
# 83 "/usr/include/math.h" 2 3
# 99 "/usr/include/math.h" 3
# 1 "/usr/include/bits/mathcalls.h" 1 3
# 54 "/usr/include/bits/mathcalls.h" 3
extern long double acosl (long double __x); extern long double __acosl (long double __x);
extern long double asinl (long double __x); extern long double __asinl (long double __x);
extern long double atanl (long double __x); extern long double __atanl (long double __x);
extern long double atan2l (long double __y, long double __x); extern long double __atan2l (long double __y, long double __x);
extern long double cosl (long double __x); extern long double __cosl (long double __x);
extern long double sinl (long double __x); extern long double __sinl (long double __x);
extern long double tanl (long double __x); extern long double __tanl (long double __x);
extern void sincosl (long double __x, long double *__sinx, long double *__cosx); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx);
extern long double coshl (long double __x); extern long double __coshl (long double __x);
extern long double sinhl (long double __x); extern long double __sinhl (long double __x);
extern long double tanhl (long double __x); extern long double __tanhl (long double __x);
extern long double acoshl (long double __x); extern long double __acoshl (long double __x);
extern long double asinhl (long double __x); extern long double __asinhl (long double __x);
extern long double atanhl (long double __x); extern long double __atanhl (long double __x);
extern long double expl (long double __x); extern long double __expl (long double __x);
extern long double exp10l (long double __x); extern long double __exp10l (long double __x);
extern long double pow10l (long double __x); extern long double __pow10l (long double __x);
extern long double frexpl (long double __x, int *__exponent); extern long double __frexpl (long double __x, int *__exponent);
extern long double ldexpl (long double __x, int __exponent); extern long double __ldexpl (long double __x, int __exponent);
extern long double logl (long double __x); extern long double __logl (long double __x);
extern long double log10l (long double __x); extern long double __log10l (long double __x);
extern long double modfl (long double __x, long double *__iptr); extern long double __modfl (long double __x, long double *__iptr);
extern long double expm1l (long double __x); extern long double __expm1l (long double __x);
extern long double log1pl (long double __x); extern long double __log1pl (long double __x);
extern long double logbl (long double __x); extern long double __logbl (long double __x);
extern long double exp2l (long double __x); extern long double __exp2l (long double __x);
extern long double log2l (long double __x); extern long double __log2l (long double __x);
extern long double powl (long double __x, long double __y); extern long double __powl (long double __x, long double __y);
extern long double sqrtl (long double __x); extern long double __sqrtl (long double __x);
extern long double hypotl (long double __x, long double __y); extern long double __hypotl (long double __x, long double __y);
extern long double cbrtl (long double __x); extern long double __cbrtl (long double __x);
extern long double ceill (long double __x); extern long double __ceill (long double __x);
extern long double fabsl (long double __x) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__const__));
extern long double floorl (long double __x); extern long double __floorl (long double __x);
extern long double fmodl (long double __x, long double __y); extern long double __fmodl (long double __x, long double __y);
extern int __isinfl (long double __value) __attribute__ ((__const__));
extern int __finitel (long double __value) __attribute__ ((__const__));
extern int isinfl (long double __value) __attribute__ ((__const__));
extern int finitel (long double __value) __attribute__ ((__const__));
extern long double infnanl (int __error) __attribute__ ((__const__)); extern long double __infnanl (int __error) __attribute__ ((__const__));
extern long double dreml (long double __x, long double __y); extern long double __dreml (long double __x, long double __y);
extern long double significandl (long double __x); extern long double __significandl (long double __x);
extern long double copysignl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__const__));
extern long double nanl (__const char *__tagb) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__const__));
extern int __isnanl (long double __value) __attribute__ ((__const__));
extern int isnanl (long double __value) __attribute__ ((__const__));
extern long double j0l (long double); extern long double __j0l (long double);
extern long double j1l (long double); extern long double __j1l (long double);
extern long double jnl (int, long double); extern long double __jnl (int, long double);
extern long double y0l (long double); extern long double __y0l (long double);
extern long double y1l (long double); extern long double __y1l (long double);
extern long double ynl (int, long double); extern long double __ynl (int, long double);
extern long double erfl (long double); extern long double __erfl (long double);
extern long double erfcl (long double); extern long double __erfcl (long double);
extern long double lgammal (long double); extern long double __lgammal (long double);
extern long double tgammal (long double); extern long double __tgammal (long double);
extern long double gammal (long double); extern long double __gammal (long double);
extern long double lgammal_r (long double, int *__signgamp); extern long double __lgammal_r (long double, int *__signgamp);
extern long double rintl (long double __x); extern long double __rintl (long double __x);
extern long double nextafterl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__const__));
extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__const__));
extern long double remainderl (long double __x, long double __y); extern long double __remainderl (long double __x, long double __y);
extern long double scalbl (long double __x, long double __n); extern long double __scalbl (long double __x, long double __n);
extern long double scalbnl (long double __x, int __n); extern long double __scalbnl (long double __x, int __n);
extern int ilogbl (long double __x); extern int __ilogbl (long double __x);
extern long double scalblnl (long double __x, long int __n); extern long double __scalblnl (long double __x, long int __n);
extern long double nearbyintl (long double __x); extern long double __nearbyintl (long double __x);
extern long double roundl (long double __x); extern long double __roundl (long double __x);
extern long double truncl (long double __x) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__const__));
extern long double remquol (long double __x, long double __y, int *__quo); extern long double __remquol (long double __x, long double __y, int *__quo);
extern long int lrintl (long double __x); extern long int __lrintl (long double __x);
extern long long int llrintl (long double __x); extern long long int __llrintl (long double __x);
extern long int lroundl (long double __x); extern long int __lroundl (long double __x);
extern long long int llroundl (long double __x); extern long long int __llroundl (long double __x);
extern long double fdiml (long double __x, long double __y); extern long double __fdiml (long double __x, long double __y);
extern long double fmaxl (long double __x, long double __y); extern long double __fmaxl (long double __x, long double __y);
extern long double fminl (long double __x, long double __y); extern long double __fminl (long double __x, long double __y);
extern int __fpclassifyl (long double __value)
__attribute__ ((__const__));
extern int __signbitl (long double __value)
__attribute__ ((__const__));
extern long double fmal (long double __x, long double __y, long double __z); extern long double __fmal (long double __x, long double __y, long double __z);
# 100 "/usr/include/math.h" 2 3
# 113 "/usr/include/math.h" 3
extern int signgam;
# 154 "/usr/include/math.h" 3
enum
{
FP_NAN,
FP_INFINITE,
FP_ZERO,
FP_SUBNORMAL,
FP_NORMAL
};
# 236 "/usr/include/math.h" 3
typedef enum
{
_IEEE_ = -1,
_SVID_,
_XOPEN_,
_POSIX_,
_ISOC_
} _LIB_VERSION_TYPE;
extern _LIB_VERSION_TYPE _LIB_VERSION;
# 259 "/usr/include/math.h" 3
struct __exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
extern int matherr (struct __exception *__exc) throw ();
# 289 "/usr/include/math.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/float.h" 1 3
# 290 "/usr/include/math.h" 2 3
# 409 "/usr/include/math.h" 3
}
# 41 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 2 3
# 68 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 3
namespace std
{
template<typename _Tp> _Tp __cmath_power(_Tp, unsigned int);
template<typename _Tp>
inline _Tp
__cmath_abs(_Tp __x)
{
return __x < _Tp() ? -__x : __x;
}
inline float
abs(float __x)
{ return __builtin_fabsf(__x); }
inline double
abs(double __x)
{ return __builtin_fabs(__x); }
inline long double
abs(long double __x)
{ return __builtin_fabsl(__x); }
inline float
acos(float __x) { return ::acosf(__x); }
using ::acos;
inline long double
acos(long double __x) { return ::acosl(__x); }
inline float
asin(float __x) { return ::asinf(__x); }
using ::asin;
inline long double
asin(long double __x) { return ::asinl(__x); }
inline float
atan(float __x) { return ::atanf(__x); }
using ::atan;
inline long double
atan(long double __x) { return ::atanl(__x); }
inline float
atan2(float __y, float __x) { return ::atan2f(__y, __x); }
using ::atan2;
inline long double
atan2(long double __y, long double __x) { return ::atan2l(__y, __x); }
inline float
ceil(float __x) { return ::ceilf(__x); }
using ::ceil;
inline long double
ceil(long double __x) { return ::ceill(__x); }
inline float
cos(float __x)
{ return __builtin_cosf(__x); }
using ::cos;
inline long double
cos(long double __x)
{ return __builtin_cosl(__x); }
inline float
cosh(float __x) { return ::coshf(__x); }
using ::cosh;
inline long double
cosh(long double __x) { return ::coshl(__x); }
# 217 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 3
inline float
exp(float __x) { return ::exp(static_cast<double>(__x)); }
using ::exp;
inline long double
exp(long double __x) { return ::expl(__x); }
inline float
fabs(float __x)
{ return __builtin_fabsf(__x); }
using ::fabs;
inline long double
fabs(long double __x)
{ return __builtin_fabsl(__x); }
inline float
floor(float __x) { return ::floorf(__x); }
using ::floor;
inline long double
floor(long double __x) { return ::floorl(__x); }
inline float
fmod(float __x, float __y) { return ::fmodf(__x, __y); }
using ::fmod;
inline long double
fmod(long double __x, long double __y) { return ::fmodl(__x, __y); }
inline float
frexp(float __x, int* __exp) { return ::frexpf(__x, __exp); }
using ::frexp;
inline long double
frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); }
inline float
ldexp(float __x, int __exp) { return ::ldexpf(__x, __exp); }
using ::ldexp;
inline long double
ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); }
inline float
log(float __x) { return ::logf(__x); }
using ::log;
inline long double
log(long double __x) { return ::logl(__x); }
inline float
log10(float __x) { return ::log10f(__x); }
using ::log10;
inline long double
log10(long double __x) { return ::log10l(__x); }
inline float
modf(float __x, float* __iptr) { return ::modff(__x, __iptr); }
# 368 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 3
using ::modf;
inline long double
modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); }
# 384 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 3
template<typename _Tp>
inline _Tp
__pow_helper(_Tp __x, int __n)
{
return __n < 0
? _Tp(1)/__cmath_power(__x, -__n)
: __cmath_power(__x, __n);
}
inline float
pow(float __x, float __y) { return ::powf(__x, __y); }
using ::pow;
inline long double
pow(long double __x, long double __y) { return ::powl(__x, __y); }
inline float
pow(float __x, int __n)
{ return __pow_helper(__x, __n); }
inline double
pow(double __x, int __i)
{ return __pow_helper(__x, __i); }
inline long double
pow(long double __x, int __n)
{ return __pow_helper(__x, __n); }
inline float
sin(float __x)
{ return __builtin_sinf(__x); }
using ::sin;
inline long double
sin(long double __x)
{ return __builtin_sinl(__x); }
inline float
sinh(float __x) { return ::sinhf(__x); }
using ::sinh;
inline long double
sinh(long double __x) { return ::sinhl(__x); }
inline float
sqrt(float __x)
{ return __builtin_sqrtf(__x); }
using ::sqrt;
inline long double
sqrt(long double __x)
{ return __builtin_sqrtl(__x); }
inline float
tan(float __x) { return ::tanf(__x); }
using ::tan;
inline long double
tan(long double __x) { return ::tanl(__x); }
inline float
tanh(float __x) { return ::tanhf(__x); }
using ::tanh;
inline long double
tanh(long double __x) { return ::tanhl(__x); }
}
namespace __gnu_cxx
{
template<typename _Tp>
int
__capture_fpclassify(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __fpclassifyf (__f) : sizeof (__f) == sizeof (double) ? __fpclassify (__f) : __fpclassifyl (__f)); }
template<typename _Tp>
int
__capture_isfinite(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __finitef (__f) : sizeof (__f) == sizeof (double) ? __finite (__f) : __finitel (__f)); }
template<typename _Tp>
int
__capture_isinf(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __isinff (__f) : sizeof (__f) == sizeof (double) ? __isinf (__f) : __isinfl (__f)); }
template<typename _Tp>
int
__capture_isnan(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __isnanf (__f) : sizeof (__f) == sizeof (double) ? __isnan (__f) : __isnanl (__f)); }
template<typename _Tp>
int
__capture_isnormal(_Tp __f) { return ((sizeof (__f) == sizeof (float) ? __fpclassifyf (__f) : sizeof (__f) == sizeof (double) ? __fpclassify (__f) : __fpclassifyl (__f)) == FP_NORMAL); }
template<typename _Tp>
int
__capture_signbit(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __signbitf (__f) : sizeof (__f) == sizeof (double) ? __signbit (__f) : __signbitl (__f)); }
template<typename _Tp>
int
__capture_isgreater(_Tp __f1, _Tp __f2)
{ return (__extension__ ({ __typeof__(__f1) __x = (__f1); __typeof__(__f2) __y = (__f2); !(__extension__ ({ __typeof__(__x) __u = (__x); __typeof__(__y) __v = (__y); (sizeof (__u) == sizeof (float) ? __fpclassifyf (__u) : sizeof (__u) == sizeof (doub le) ? __fpclassify (__u) : __fpclassifyl (__u)) == FP_NAN || (sizeof (__v) == sizeof (float) ? __fpclassifyf (__v) : sizeof (__v) == sizeof (double) ? __fpclassify (__v) : __fpclassifyl (__v)) == FP_NAN; })) && __x > __y; })); }
template<typename _Tp>
int
__capture_isgreaterequal(_Tp __f1, _Tp __f2)
{ return (__extension__ ({ __typeof__(__f1) __x = (__f1); __typeof__(__f2) __y = (__f2); !(__extension__ ({ __typeof__(__x) __u = (__x); __typeof__(__y) __v = (__y); (sizeof (__u) == sizeof (float) ? __fpclassifyf (__u) : sizeof (__u) == sizeof (dou ble) ? __fpclassify (__u) : __fpclassifyl (__u)) == FP_NAN || (sizeof (__v) == sizeof (float) ? __fpclassifyf (__v) : sizeof (__v) == sizeof (double) ? __fpclassify (__v) : __fpclassifyl (__v)) == FP_NAN; })) && __x >= __y; })); }
template<typename _Tp>
int
__capture_isless(_Tp __f1, _Tp __f2) { return (__extension__ ({ __typeof__(__f1) __x = (__f1); __typeof__(__f2) __y = (__f2); !(__extension__ ({ __typeof__(__x) __u = (__x); __typeof__(__y) __v = (__y); (sizeof (__u) == sizeof (float) ? __fpclassify f (__u) : sizeof (__u) == sizeof (double) ? __fpclassify (__u) : __fpclassifyl (__u)) == FP_NAN || (sizeof (__v) == sizeof (float) ? __fpclassifyf (__v) : sizeof (__v) == sizeof (double) ? __fpclassify (__v) : __fpclassifyl (__v)) == FP_NAN; })) && __x < __y; })); }
template<typename _Tp>
int
__capture_islessequal(_Tp __f1, _Tp __f2)
{ return (__extension__ ({ __typeof__(__f1) __x = (__f1); __typeof__(__f2) __y = (__f2); !(__extension__ ({ __typeof__(__x) __u = (__x); __typeof__(__y) __v = (__y); (sizeof (__u) == sizeof (float) ? __fpclassifyf (__u) : sizeof (__u) == sizeof (dou ble) ? __fpclassify (__u) : __fpclassifyl (__u)) == FP_NAN || (sizeof (__v) == sizeof (float) ? __fpclassifyf (__v) : sizeof (__v) == sizeof (double) ? __fpclassify (__v) : __fpclassifyl (__v)) == FP_NAN; })) && __x <= __y; })); }
template<typename _Tp>
int
__capture_islessgreater(_Tp __f1, _Tp __f2)
{ return (__extension__ ({ __typeof__(__f1) __x = (__f1); __typeof__(__f2) __y = (__f2); !(__extension__ ({ __typeof__(__x) __u = (__x); __typeof__(__y) __v = (__y); (sizeof (__u) == sizeof (float) ? __fpclassifyf (__u) : sizeof (__u) == sizeof (dou ble) ? __fpclassify (__u) : __fpclassifyl (__u)) == FP_NAN || (sizeof (__v) == sizeof (float) ? __fpclassifyf (__v) : sizeof (__v) == sizeof (double) ? __fpclassify (__v) : __fpclassifyl (__v)) == FP_NAN; })) && (__x < __y || __y < __x); })); }
template<typename _Tp>
int
__capture_isunordered(_Tp __f1, _Tp __f2)
{ return (__extension__ ({ __typeof__(__f1) __u = (__f1); __typeof__(__f2) __v = (__f2); (sizeof (__u) == sizeof (float) ? __fpclassifyf (__u) : sizeof (__u) == sizeof (double) ? __fpclassify (__u) : __fpclassifyl (__u)) == FP_NAN || (sizeof (__v) = = sizeof (float) ? __fpclassifyf (__v) : sizeof (__v) == sizeof (double) ? __fpclassify (__v) : __fpclassifyl (__v)) == FP_NAN; })); }
}
# 576 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 3
namespace __gnu_cxx
{
template<typename _Tp>
int
fpclassify(_Tp __f) { return __capture_fpclassify(__f); }
template<typename _Tp>
int
isfinite(_Tp __f) { return __capture_isfinite(__f); }
template<typename _Tp>
int
isinf(_Tp __f) { return __capture_isinf(__f); }
template<typename _Tp>
int
isnan(_Tp __f) { return __capture_isnan(__f); }
template<typename _Tp>
int
isnormal(_Tp __f) { return __capture_isnormal(__f); }
template<typename _Tp>
int
signbit(_Tp __f) { return __capture_signbit(__f); }
template<typename _Tp>
int
isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); }
template<typename _Tp>
int
isgreaterequal(_Tp __f1, _Tp __f2)
{ return __capture_isgreaterequal(__f1, __f2); }
template<typename _Tp>
int
isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); }
template<typename _Tp>
int
islessequal(_Tp __f1, _Tp __f2)
{ return __capture_islessequal(__f1, __f2); }
template<typename _Tp>
int
islessgreater(_Tp __f1, _Tp __f2)
{ return __capture_islessgreater(__f1, __f2); }
template<typename _Tp>
int
isunordered(_Tp __f1, _Tp __f2)
{ return __capture_isunordered(__f1, __f2); }
}
namespace std
{
using __gnu_cxx::fpclassify;
using __gnu_cxx::isfinite;
using __gnu_cxx::isinf;
using __gnu_cxx::isnan;
using __gnu_cxx::isnormal;
using __gnu_cxx::signbit;
using __gnu_cxx::isgreater;
using __gnu_cxx::isgreaterequal;
using __gnu_cxx::isless;
using __gnu_cxx::islessequal;
using __gnu_cxx::islessgreater;
using __gnu_cxx::isunordered;
}
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/cmath.tcc" 1 3
# 35 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/cmath.tcc" 3
namespace std
{
template<typename _Tp>
_Tp
__cmath_power(_Tp __x, unsigned int __n)
{
_Tp __y = __n % 2 ? __x : 1;
while (__n >>= 1)
{
__x = __x * __x;
if (__n % 2)
__y = __y * __x;
}
return __y;
}
}
# 651 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cmath.h" 2 3
# 32 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cmath" 2 3
# 3 "foo.cc" 2
# 20 "foo.cc"
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/algorithm" 1 3
# 31 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/algorithm" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_algorithm.h" 1 3
# 60 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_algorithm.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 1 3
# 64 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 65 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_pair.h" 1 3
# 64 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_pair.h" 3
namespace std
{
template <class _T1, class _T2>
struct pair {
typedef _T1 first_type;
typedef _T2 second_type;
_T1 first;
_T2 second;
pair() : first(), second() {}
pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
template <class _U1, class _U2>
pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
};
template <class _T1, class _T2>
inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{
return __x.first == __y.first && __x.second == __y.second;
}
template <class _T1, class _T2>
inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
{
return __x.first < __y.first ||
(!(__y.first < __x.first) && __x.second < __y.second);
}
template <class _T1, class _T2>
inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return !(__x == __y);
}
template <class _T1, class _T2>
inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return __y < __x;
}
template <class _T1, class _T2>
inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return !(__y < __x);
}
template <class _T1, class _T2>
inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
return !(__x < __y);
}
# 139 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_pair.h" 3
template <class _T1, class _T2>
inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y)
{
return pair<_T1, _T2>(__x, __y);
}
}
# 67 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/type_traits.h" 1 3
# 48 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/type_traits.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 50 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/type_traits.h" 2 3
# 86 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/type_traits.h" 3
template <bool _Truth> struct _Bool {};
typedef _Bool<true> __true_type;
typedef _Bool<false> __false_type;
template <class _Tp>
struct __type_traits {
typedef __true_type this_dummy_member_must_be_first;
# 110 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/type_traits.h" 3
typedef __false_type has_trivial_default_constructor;
typedef __false_type has_trivial_copy_constructor;
typedef __false_type has_trivial_assignment_operator;
typedef __false_type has_trivial_destructor;
typedef __false_type is_POD_type;
};
template<> struct __type_traits<bool> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<char> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<signed char> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned char> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<wchar_t> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<short> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned short> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<int> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned int> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<long long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<unsigned long long> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<float> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<double> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template<> struct __type_traits<long double> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template <class _Tp>
struct __type_traits<_Tp*> {
typedef __true_type has_trivial_default_constructor;
typedef __true_type has_trivial_copy_constructor;
typedef __true_type has_trivial_assignment_operator;
typedef __true_type has_trivial_destructor;
typedef __true_type is_POD_type;
};
template <class _Tp> struct _Is_integer {
typedef __false_type _Integral;
};
template<> struct _Is_integer<bool> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<char> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<signed char> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned char> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<wchar_t> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<short> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned short> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<int> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned int> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<long> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned long> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<long long> {
typedef __true_type _Integral;
};
template<> struct _Is_integer<unsigned long long> {
typedef __true_type _Integral;
};
template<typename _Tp> struct _Is_normal_iterator {
typedef __false_type _Normal;
};
namespace std {
template<typename _Iterator, typename _Container> class __normal_iterator;
};
template<typename _Iterator, typename _Container>
struct _Is_normal_iterator< std::__normal_iterator<_Iterator, _Container> > {
typedef __true_type _Normal;
};
# 70 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstring.h" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstring.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 147 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 3
typedef int ptrdiff_t;
# 199 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 3
typedef unsigned int size_t;
# 39 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 2 3
namespace std
{
using ::ptrdiff_t;
using ::size_t;
}
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstring.h" 2 3
# 40 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstring.h" 3
# 1 "/usr/include/string.h" 1 3
# 26 "/usr/include/string.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/string.h" 2 3
extern "C" {
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 34 "/usr/include/string.h" 2 3
extern void * memcpy (void * __restrict __dest, __const void * __restrict __src, size_t __n) throw ();
extern void * memmove (void * __dest, __const void * __src, size_t __n) throw ();
extern void * memccpy (void * __dest, __const void * __src, int __c, size_t __n) throw ();
extern void * memset (void * __s, int __c, size_t __n) throw ();
extern int memcmp (__const void * __s1, __const void * __s2, size_t __n) throw ();
extern void * memchr (__const void * __s, int __c, size_t __n) throw ();
extern void * rawmemchr (__const void * __s, int __c) throw ();
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw ();
extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw ();
extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw ();
extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw ();
extern int strcmp (__const char *__s1, __const char *__s2) throw ();
extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw ();
extern int strcoll (__const char *__s1, __const char *__s2) throw ();
extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw ();
# 1 "/usr/include/xlocale.h" 1 3
# 28 "/usr/include/xlocale.h" 3
typedef struct __locale_struct
{
struct locale_data *__locales[6];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
} *__locale_t;
# 100 "/usr/include/string.h" 2 3
extern int __strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw ();
extern size_t __strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw ();
extern char *__strdup (__const char *__s) throw ();
extern char *strdup (__const char *__s) throw ();
extern char *strndup (__const char *__string, size_t __n) throw ();
# 146 "/usr/include/string.h" 3
extern char *strchr (__const char *__s, int __c) throw ();
extern char *strrchr (__const char *__s, int __c) throw ();
extern char *strchrnul (__const char *__s, int __c) throw ();
extern size_t strcspn (__const char *__s, __const char *__reject) throw ();
extern size_t strspn (__const char *__s, __const char *__accept) throw ();
extern char *strpbrk (__const char *__s, __const char *__accept) throw ();
extern char *strstr (__const char *__haystack, __const char *__needle) throw ();
extern char *__strcasestr (__const char *__haystack, __const char *__needle) throw ();
extern char *strcasestr (__const char *__haystack, __const char *__needle) throw ();
extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw ();
extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw ();
extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw ();
# 194 "/usr/include/string.h" 3
extern void * memmem (__const void * __haystack, size_t __haystacklen, __const void * __needle, size_t __needlelen) throw ();
extern void * __mempcpy (void * __restrict __dest, __const void * __restrict __src, size_t __n) throw ();
extern void * mempcpy (void * __restrict __dest, __const void * __restrict __src, size_t __n) throw ();
extern size_t strlen (__const char *__s) throw ();
extern size_t strnlen (__const char *__string, size_t __maxlen) throw ();
extern char *strerror (int __errnum) throw ();
extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw ();
extern void __bzero (void * __s, size_t __n) throw ();
extern void bcopy (__const void * __src, void * __dest, size_t __n) throw ();
extern void bzero (void * __s, size_t __n) throw ();
extern int bcmp (__const void * __s1, __const void * __s2, size_t __n) throw ();
extern char *index (__const char *__s, int __c) throw ();
extern char *rindex (__const char *__s, int __c) throw ();
extern int __ffs (int __i) throw () __attribute__ ((const));
extern int ffs (int __i) throw () __attribute__ ((const));
extern int ffsl (long int __l) throw () __attribute__ ((const));
__extension__ extern int ffsll (long long int __ll) throw ()
__attribute__ ((const));
extern int __strcasecmp (__const char *__s1, __const char *__s2) throw ();
extern int strcasecmp (__const char *__s1, __const char *__s2) throw ();
extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw ();
extern int __strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw ();
extern int __strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw ();
extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw ();
extern int strverscmp (__const char *__s1, __const char *__s2) throw ();
extern char *strsignal (int __sig) throw ();
extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw ();
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw ();
extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw ();
extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw ();
extern char *strfry (char *__string) throw ();
extern void * memfrob (void * __s, size_t __n) throw ();
extern char *basename (__const char *__filename) throw ();
# 350 "/usr/include/string.h" 3
}
# 41 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstring.h" 2 3
# 66 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstring.h" 3
namespace std
{
using ::memcpy;
using ::memmove;
using ::strcpy;
using ::strncpy;
using ::strcat;
using ::strncat;
using ::memcmp;
using ::strcmp;
using ::strcoll;
using ::strncmp;
using ::strxfrm;
using ::strcspn;
using ::strspn;
using ::strtok;
using ::memset;
using ::strerror;
using ::strlen;
using ::memchr;
inline void*
memchr(void* __p, int __c, size_t __n)
{ return memchr(const_cast<const void*>(__p), __c, __n); }
using ::strchr;
inline char*
strchr(char* __s1, int __n)
{ return __builtin_strchr(const_cast<const char*>(__s1), __n); }
using ::strpbrk;
inline char*
strpbrk(char* __s1, const char* __s2)
{ return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
using ::strrchr;
inline char*
strrchr(char* __s1, int __n)
{ return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
using ::strstr;
inline char*
strstr(char* __s1, const char* __s2)
{ return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
}
# 72 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_climits.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_climits.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/limits.h" 1 3
# 11 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/limits.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/syslimits.h" 1 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/limits.h" 1 3
# 125 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/limits.h" 3
# 1 "/usr/include/limits.h" 1 3
# 26 "/usr/include/limits.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/limits.h" 2 3
# 1 "/usr/include/bits/posix1_lim.h" 1 3
# 126 "/usr/include/bits/posix1_lim.h" 3
# 1 "/usr/include/bits/local_lim.h" 1 3
# 27 "/usr/include/bits/local_lim.h" 3
# 1 "/usr/include/linux/limits.h" 1 3
# 28 "/usr/include/bits/local_lim.h" 2 3
# 127 "/usr/include/bits/posix1_lim.h" 2 3
# 31 "/usr/include/limits.h" 2 3
# 1 "/usr/include/bits/posix2_lim.h" 1 3
# 35 "/usr/include/limits.h" 2 3
# 1 "/usr/include/bits/xopen_lim.h" 1 3
# 34 "/usr/include/bits/xopen_lim.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 35 "/usr/include/bits/xopen_lim.h" 2 3
# 39 "/usr/include/limits.h" 2 3
# 126 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/limits.h" 2 3
# 8 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/syslimits.h" 2 3
# 12 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/limits.h" 2 3
# 39 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_climits.h" 2 3
# 73 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 1 3
# 39 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 2 3
# 41 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 3
# 1 "/usr/include/stdlib.h" 1 3
# 25 "/usr/include/stdlib.h" 3
# 1 "/usr/include/features.h" 1 3
# 26 "/usr/include/stdlib.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 34 "/usr/include/stdlib.h" 2 3
extern "C" {
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long int quot;
long int rem;
} ldiv_t;
__extension__ typedef struct
{
long long int quot;
long long int rem;
} lldiv_t;
# 80 "/usr/include/stdlib.h" 3
extern size_t __ctype_get_mb_cur_max (void) throw ();
extern double atof (__const char *__nptr) throw ();
extern int atoi (__const char *__nptr) throw ();
extern long int atol (__const char *__nptr) throw ();
__extension__ extern long long int atoll (__const char *__nptr) throw ();
extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw ();
extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw ();
extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw ();
extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ();
extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ();
__extension__
extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ();
__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ();
# 132 "/usr/include/stdlib.h" 3
__extension__
extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ();
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw ();
# 157 "/usr/include/stdlib.h" 3
# 1 "/usr/include/xlocale.h" 1 3
# 158 "/usr/include/stdlib.h" 2 3
extern long int __strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw ();
extern unsigned long int __strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw ();
__extension__
extern long long int __strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw ();
__extension__
extern unsigned long long int __strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw ();
extern double __strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw ();
extern float __strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw ();
extern long double __strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw ();
# 196 "/usr/include/stdlib.h" 3
extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw ();
extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw ();
extern long double __strtold_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __group) throw ();
extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw ();
extern unsigned long int __strtoul_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) throw ();
__extension__
extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw ();
__extension__
extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char ** __restrict __endptr, int __base, int __group) throw ();
# 333 "/usr/include/stdlib.h" 3
extern char *l64a (long int __n) throw ();
extern long int a64l (__const char *__s) throw ();
# 1 "/usr/include/sys/types.h" 1 3
# 26 "/usr/include/sys/types.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/sys/types.h" 2 3
extern "C" {
# 1 "/usr/include/bits/types.h" 1 3
# 26 "/usr/include/bits/types.h" 3
# 1 "/usr/include/features.h" 1 3
# 27 "/usr/include/bits/types.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 30 "/usr/include/bits/types.h" 2 3
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;
# 49 "/usr/include/bits/types.h" 3
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
typedef __quad_t *__qaddr_t;
typedef __u_quad_t __dev_t;
typedef __u_int __uid_t;
typedef __u_int __gid_t;
typedef __u_long __ino_t;
typedef __u_int __mode_t;
typedef __u_int __nlink_t;
typedef long int __off_t;
typedef __quad_t __loff_t;
typedef int __pid_t;
typedef int __ssize_t;
typedef long int __rlim_t;
typedef __quad_t __rlim64_t;
typedef __u_int __id_t;
typedef struct
{
int __val[2];
} __fsid_t;
typedef int __daddr_t;
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __swblk_t;
typedef long int __clock_t;
typedef unsigned long int __fd_mask;
# 100 "/usr/include/bits/types.h" 3
typedef struct
{
__fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))];
} __fd_set;
typedef int __key_t;
typedef unsigned short int __ipc_pid_t;
typedef long int __blkcnt_t;
typedef __quad_t __blkcnt64_t;
typedef __u_long __fsblkcnt_t;
typedef __u_quad_t __fsblkcnt64_t;
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
typedef __u_long __ino64_t;
typedef __loff_t __off64_t;
typedef long int __t_scalar_t;
typedef unsigned long int __t_uscalar_t;
typedef int __intptr_t;
# 1 "/usr/include/bits/pthreadtypes.h" 1 3
# 23 "/usr/include/bits/pthreadtypes.h" 3
# 1 "/usr/include/bits/sched.h" 1 3
# 68 "/usr/include/bits/sched.h" 3
struct __sched_param
{
int sched_priority;
};
# 24 "/usr/include/bits/pthreadtypes.h" 2 3
struct _pthread_fastlock
{
long int __status;
int __spinlock;
};
typedef struct _pthread_descr_struct *_pthread_descr;
typedef struct
{
int __detachstate;
int __schedpolicy;
struct __sched_param __schedparam;
int __inheritsched;
int __scope;
size_t __guardsize;
int __stackaddr_set;
void *__stackaddr;
size_t __stacksize;
} pthread_attr_t;
typedef struct
{
struct _pthread_fastlock __c_lock;
_pthread_descr __c_waiting;
} pthread_cond_t;
typedef struct
{
int __dummy;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef struct
{
int __m_reserved;
int __m_count;
_pthread_descr __m_owner;
int __m_kind;
struct _pthread_fastlock __m_lock;
} pthread_mutex_t;
typedef struct
{
int __mutexkind;
} pthread_mutexattr_t;
typedef int pthread_once_t;
typedef struct _pthread_rwlock_t
{
struct _pthread_fastlock __rw_lock;
int __rw_readers;
_pthread_descr __rw_writer;
_pthread_descr __rw_read_waiting;
_pthread_descr __rw_write_waiting;
int __rw_kind;
int __rw_pshared;
} pthread_rwlock_t;
typedef struct
{
int __lockkind;
int __pshared;
} pthread_rwlockattr_t;
typedef unsigned long int pthread_t;
# 151 "/usr/include/bits/types.h" 2 3
# 31 "/usr/include/sys/types.h" 2 3
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __ino64_t ino64_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
typedef __off_t off_t;
typedef __off64_t off64_t;
typedef __pid_t pid_t;
typedef __id_t id_t;
typedef __ssize_t ssize_t;
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 1 "/usr/include/time.h" 1 3
# 57 "/usr/include/time.h" 3
# 1 "/usr/include/bits/types.h" 1 3
# 58 "/usr/include/time.h" 2 3
typedef __clock_t clock_t;
# 1 "/usr/include/bits/types.h" 1 3
# 69 "/usr/include/time.h" 2 3
typedef __time_t time_t;
# 123 "/usr/include/sys/types.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 126 "/usr/include/sys/types.h" 2 3
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 169 "/usr/include/sys/types.h" 3
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 191 "/usr/include/sys/types.h" 3
# 1 "/usr/include/endian.h" 1 3
# 22 "/usr/include/endian.h" 3
# 1 "/usr/include/features.h" 1 3
# 23 "/usr/include/endian.h" 2 3
# 35 "/usr/include/endian.h" 3
# 1 "/usr/include/bits/endian.h" 1 3
# 36 "/usr/include/endian.h" 2 3
# 192 "/usr/include/sys/types.h" 2 3
# 1 "/usr/include/sys/select.h" 1 3
# 25 "/usr/include/sys/select.h" 3
# 1 "/usr/include/features.h" 1 3
# 26 "/usr/include/sys/select.h" 2 3
# 1 "/usr/include/bits/types.h" 1 3
# 29 "/usr/include/sys/select.h" 2 3
# 1 "/usr/include/bits/select.h" 1 3
# 32 "/usr/include/sys/select.h" 2 3
# 1 "/usr/include/bits/sigset.h" 1 3
# 23 "/usr/include/bits/sigset.h" 3
typedef int __sig_atomic_t;
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3
# 1 "/usr/include/time.h" 1 3
# 83 "/usr/include/time.h" 3
struct timespec
{
long int tv_sec;
long int tv_nsec;
};
# 39 "/usr/include/sys/select.h" 2 3
extern "C" {
struct timeval;
typedef __fd_mask fd_mask;
typedef __fd_set fd_set;
# 74 "/usr/include/sys/select.h" 3
extern int __select (int __nfds, __fd_set *__readfds, __fd_set *__writefds, __fd_set *__exceptfds, struct timeval *__timeout) throw ();
extern int select (int __nfds, __fd_set *__readfds, __fd_set *__writefds, __fd_set *__exceptfds, struct timeval *__timeout) throw ();
# 87 "/usr/include/sys/select.h" 3
extern int pselect (int __nfds, __fd_set *__readfds, __fd_set *__writefds, __fd_set *__exceptfds, const struct timespec *__timeout, const __sigset_t *__sigmask) throw ();
}
# 195 "/usr/include/sys/types.h" 2 3
# 1 "/usr/include/sys/sysmacros.h" 1 3
# 198 "/usr/include/sys/types.h" 2 3
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;
}
# 340 "/usr/include/stdlib.h" 2 3
extern int32_t random (void) throw ();
extern void srandom (unsigned int __seed) throw ();
extern void * initstate (unsigned int __seed, void * __statebuf, size_t __statelen) throw ();
extern void * setstate (void * __statebuf) throw ();
struct random_data
{
int32_t *fptr;
int32_t *rptr;
int32_t *state;
int rand_type;
int rand_deg;
int rand_sep;
int32_t *end_ptr;
};
extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw ();
extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw ();
extern int initstate_r (unsigned int __seed, void * __restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw ();
extern int setstate_r (void * __restrict __statebuf, struct random_data *__restrict __buf) throw ();
extern int rand (void) throw ();
extern void srand (unsigned int __seed) throw ();
extern int rand_r (unsigned int *__seed) throw ();
extern double drand48 (void) throw ();
extern double erand48 (unsigned short int __xsubi[3]) throw ();
extern long int lrand48 (void) throw ();
extern long int nrand48 (unsigned short int __xsubi[3]) throw ();
extern long int mrand48 (void) throw ();
extern long int jrand48 (unsigned short int __xsubi[3]) throw ();
extern void srand48 (long int __seedval) throw ();
extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw ();
extern void lcong48 (unsigned short int __param[7]) throw ();
struct drand48_data
{
unsigned short int x[3];
unsigned short int a[3];
unsigned short int c;
unsigned short int old_x[3];
int init;
};
extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw ();
extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw ();
extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw ();
extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw ();
extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw ();
extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw ();
extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw ();
extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw ();
extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw ();
# 474 "/usr/include/stdlib.h" 3
extern void * malloc (size_t __size) throw ();
extern void * calloc (size_t __nmemb, size_t __size) throw ();
extern void * realloc (void * __ptr, size_t __size) throw ();
extern void free (void * __ptr) throw ();
extern void cfree (void * __ptr) throw ();
# 1 "/usr/include/alloca.h" 1 3
# 22 "/usr/include/alloca.h" 3
# 1 "/usr/include/features.h" 1 3
# 23 "/usr/include/alloca.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 26 "/usr/include/alloca.h" 2 3
extern "C" {
extern void * alloca (size_t __size) throw ();
}
# 493 "/usr/include/stdlib.h" 2 3
extern void * valloc (size_t __size) throw ();
extern void abort (void) throw () __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) throw ();
extern int __on_exit (void (*__func) (int __status, void * __arg), void * __arg) throw ();
extern int on_exit (void (*__func) (int __status, void * __arg), void * __arg) throw ();
extern void exit (int __status) throw () __attribute__ ((__noreturn__));
extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
extern char *getenv (__const char *__name) throw ();
extern char *__secure_getenv (__const char *__name) throw ();
extern int putenv (char *__string) throw ();
extern int setenv (__const char *__name, __const char *__value, int __replace) throw ();
extern void unsetenv (__const char *__name) throw ();
extern int clearenv (void) throw ();
# 566 "/usr/include/stdlib.h" 3
extern char *mktemp (char *__template) throw ();
extern int mkstemp (char *__template) throw ();
extern int system (__const char *__command) throw ();
extern char *canonicalize_file_name (__const char *__name) throw ();
# 595 "/usr/include/stdlib.h" 3
extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw ();
typedef int (*__compar_fn_t) (__const void *, __const void *);
typedef __compar_fn_t comparison_fn_t;
extern void * bsearch (__const void * __key, __const void * __base, size_t __nmemb, size_t __size, __compar_fn_t __compar);
extern void qsort (void * __base, size_t __nmemb, size_t __size, __compar_fn_t __compar);
extern int abs (int __x) throw () __attribute__ ((__const__));
extern long int labs (long int __x) throw () __attribute__ ((__const__));
__extension__ extern long long int llabs (long long int __x) throw ()
__attribute__ ((__const__));
extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__));
extern ldiv_t ldiv (long int __numer, long int __denom) throw ()
__attribute__ ((__const__));
__extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw ()
__attribute__ ((__const__));
# 651 "/usr/include/stdlib.h" 3
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *gcvt (double __value, int __ndigit, char *__buf) throw ();
extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw ();
extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw ();
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw ();
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw ();
extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw ();
extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw ();
# 695 "/usr/include/stdlib.h" 3
extern int mblen (__const char *__s, size_t __n) throw ();
extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw ();
extern int wctomb (char *__s, wchar_t __wchar) throw ();
extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw ();
extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw ();
# 718 "/usr/include/stdlib.h" 3
extern int rpmatch (__const char *__response) throw ();
# 729 "/usr/include/stdlib.h" 3
extern int getsubopt (char **__restrict __optionp, __const char *__const *__restrict __tokens, char **__restrict __valuep) throw ();
# 738 "/usr/include/stdlib.h" 3
extern void setkey (__const char *__key) throw ();
extern int grantpt (int __fd) throw ();
extern int unlockpt (int __fd) throw ();
extern char *ptsname (int __fd) throw ();
extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw ();
extern int getpt (void) throw ();
}
# 42 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 2 3
# 73 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 3
namespace std
{
using ::div_t;
using ::ldiv_t;
using ::abort;
using ::abs;
using ::atexit;
using ::atof;
using ::atoi;
using ::atol;
using ::bsearch;
using ::calloc;
using ::div;
using ::exit;
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
using ::qsort;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
using ::wcstombs;
using ::wctomb;
inline long
abs(long __i) { return labs(__i); }
inline ldiv_t
div(long __i, long __j) { return ldiv(__i, __j); }
}
# 125 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdlib.h" 3
namespace __gnu_cxx
{
using ::lldiv_t;
using ::_Exit;
inline long long
abs(long long __x) { return __x >= 0 ? __x : -__x; }
inline long long
llabs(long long __x) { return __x >= 0 ? __x : -__x; }
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
inline lldiv_t
lldiv(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::atoll;
using ::strtof;
using ::strtoll;
using ::strtoull;
using ::strtold;
}
namespace std
{
using __gnu_cxx::lldiv_t;
using __gnu_cxx::_Exit;
using __gnu_cxx::abs;
using __gnu_cxx::llabs;
using __gnu_cxx::div;
using __gnu_cxx::lldiv;
using __gnu_cxx::atoll;
using __gnu_cxx::strtof;
using __gnu_cxx::strtoll;
using __gnu_cxx::strtoull;
using __gnu_cxx::strtold;
}
# 74 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 1 3
# 75 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/new" 1 3
# 40 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/new" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cstddef" 1 3
# 41 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/new" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/exception" 1 3
# 39 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/exception" 3
extern "C++" {
namespace std
{
class exception
{
public:
exception() throw() { }
virtual ~exception() throw();
virtual const char* what() const throw();
};
class bad_exception : public exception
{
public:
bad_exception() throw() { }
virtual ~bad_exception() throw();
};
typedef void (*terminate_handler) ();
typedef void (*unexpected_handler) ();
terminate_handler set_terminate(terminate_handler) throw();
void terminate() __attribute__ ((__noreturn__));
unexpected_handler set_unexpected(unexpected_handler) throw();
void unexpected() __attribute__ ((__noreturn__));
# 95 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/exception" 3
bool uncaught_exception() throw();
}
}
# 42 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/new" 2 3
extern "C++" {
namespace std
{
class bad_alloc : public exception
{
public:
bad_alloc() throw() { }
virtual ~bad_alloc() throw();
};
struct nothrow_t { };
extern const nothrow_t nothrow;
typedef void (*new_handler)();
new_handler set_new_handler(new_handler);
}
# 76 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/new" 3
void *operator new(std::size_t) throw (std::bad_alloc);
void *operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void *) throw();
void operator delete[](void *) throw();
void *operator new(std::size_t, const std::nothrow_t&) throw();
void *operator new[](std::size_t, const std::nothrow_t&) throw();
void operator delete(void *, const std::nothrow_t&) throw();
void operator delete[](void *, const std::nothrow_t&) throw();
inline void *operator new(std::size_t, void *place) throw() { return place; }
inline void *operator new[](std::size_t, void *place) throw() { return place; }
}
# 76 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_iosfwd.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_iosfwd.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 40 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_iosfwd.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stringfwd.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stringfwd.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 40 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stringfwd.h" 2 3
namespace std
{
template<class _CharT>
struct char_traits;
template<> struct char_traits<char>;
template<typename _Alloc>
class allocator;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_string;
typedef basic_string<char> string;
}
# 41 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_iosfwd.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/fpos.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/fpos.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h" 1 3
# 35 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cstdio" 1 3
# 31 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cstdio" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 1 3
# 39 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 2 3
# 41 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 3
# 1 "/usr/include/stdio.h" 1 3
# 27 "/usr/include/stdio.h" 3
# 1 "/usr/include/features.h" 1 3
# 28 "/usr/include/stdio.h" 2 3
extern "C" {
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 34 "/usr/include/stdio.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stdarg.h" 1 3
# 43 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 110 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stdarg.h" 3
typedef __gnuc_va_list va_list;
# 39 "/usr/include/stdio.h" 2 3
# 1 "/usr/include/bits/types.h" 1 3
# 41 "/usr/include/stdio.h" 2 3
typedef struct _IO_FILE FILE;
# 57 "/usr/include/stdio.h" 3
# 1 "/usr/include/libio.h" 1 3
# 30 "/usr/include/libio.h" 3
# 1 "/usr/include/_G_config.h" 1 3
# 9 "/usr/include/_G_config.h" 3
# 1 "/usr/include/bits/types.h" 1 3
# 10 "/usr/include/_G_config.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 312 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 3
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3
# 35 "/usr/include/_G_config.h" 3
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 31 "/usr/include/libio.h" 2 3
# 48 "/usr/include/libio.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stdarg.h" 1 3
# 49 "/usr/include/libio.h" 2 3
# 154 "/usr/include/libio.h" 3
struct _IO_jump_t; struct _IO_FILE;
# 164 "/usr/include/libio.h" 3
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 187 "/usr/include/libio.h" 3
};
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _blksize;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
# 233 "/usr/include/libio.h" 3
__off64_t _offset;
int _unused2[16];
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 262 "/usr/include/libio.h" 3
typedef __ssize_t __io_read_fn (void * __cookie, char *__buf, size_t __nbytes);
# 271 "/usr/include/libio.h" 3
typedef __ssize_t __io_write_fn (void * __cookie, __const char *__buf, size_t __n);
# 280 "/usr/include/libio.h" 3
typedef int __io_seek_fn (void * __cookie, __off_t __pos, int __w);
typedef int __io_close_fn (void * __cookie);
typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;
typedef struct
{
__io_read_fn *read;
__io_write_fn *write;
__io_seek_fn *seek;
__io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;
struct _IO_cookie_file
{
struct _IO_FILE __file;
const void *__vtable;
void *__cookie;
_IO_cookie_io_functions_t __io_functions;
};
extern "C" {
extern int __underflow (_IO_FILE *) throw ();
extern int __uflow (_IO_FILE *) throw ();
extern int __overflow (_IO_FILE *, int) throw ();
# 337 "/usr/include/libio.h" 3
extern int _IO_getc (_IO_FILE *__fp) throw ();
extern int _IO_putc (int __c, _IO_FILE *__fp) throw ();
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();
extern int _IO_peekc_locked (_IO_FILE *__fp) throw ();
extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 363 "/usr/include/libio.h" 3
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict) throw ();
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list) throw ();
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw ();
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw ();
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw ();
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw ();
extern void _IO_free_backup_area (_IO_FILE *) throw ();
}
# 58 "/usr/include/stdio.h" 2 3
typedef __off_t fpos_t;
typedef __off64_t fpos64_t;
# 110 "/usr/include/stdio.h" 3
# 1 "/usr/include/bits/stdio_lim.h" 1 3
# 111 "/usr/include/stdio.h" 2 3
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
extern int remove (__const char *__filename) throw ();
extern int rename (__const char *__old, __const char *__new) throw ();
extern FILE *tmpfile (void) throw ();
# 140 "/usr/include/stdio.h" 3
extern FILE *tmpfile64 (void) throw ();
extern char *tmpnam (char *__s) throw ();
extern char *tmpnam_r (char *__s) throw ();
# 160 "/usr/include/stdio.h" 3
extern char *tempnam (__const char *__dir, __const char *__pfx) throw ();
extern int fclose (FILE *__stream) throw ();
extern int fflush (FILE *__stream) throw ();
extern int fflush_unlocked (FILE *__stream) throw ();
extern int fcloseall (void) throw ();
extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) throw ();
extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) throw ();
# 203 "/usr/include/stdio.h" 3
extern FILE *fopen64 (__const char *__restrict __filename, __const char *__restrict __modes) throw ();
extern FILE *freopen64 (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) throw ();
extern FILE *fdopen (int __fd, __const char *__modes) throw ();
extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw ();
extern FILE *open_memstream (char **__restrict __bufloc, size_t *__restrict __sizeloc) throw ();
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw ();
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw ();
extern void setlinebuf (FILE *__stream) throw ();
extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...) throw ();
extern int printf (__const char *__restrict __format, ...) throw ();
extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) throw ();
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw ();
extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg) throw ();
extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw ();
extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw ()
__attribute__ ((__format__ (__printf__, 3, 4)));
extern int __vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw ()
__attribute__ ((__format__ (__printf__, 3, 0)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw ()
__attribute__ ((__format__ (__printf__, 3, 0)));
extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw ()
__attribute__ ((__format__ (__printf__, 2, 0)));
extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw ()
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw ()
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) throw ()
__attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...) throw ()
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) throw ();
extern int scanf (__const char *__restrict __format, ...) throw ();
extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) throw ();
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw ()
__attribute__ ((__format__ (__scanf__, 2, 0)));
extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) throw ()
__attribute__ ((__format__ (__scanf__, 1, 0)));
extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw ()
__attribute__ ((__format__ (__scanf__, 2, 0)));
extern int fgetc (FILE *__stream) throw ();
extern int getc (FILE *__stream) throw ();
extern int getchar (void) throw ();
extern int getc_unlocked (FILE *__stream) throw ();
extern int getchar_unlocked (void) throw ();
extern int fgetc_unlocked (FILE *__stream) throw ();
extern int fputc (int __c, FILE *__stream) throw ();
extern int putc (int __c, FILE *__stream) throw ();
extern int putchar (int __c) throw ();
extern int fputc_unlocked (int __c, FILE *__stream) throw ();
extern int putc_unlocked (int __c, FILE *__stream) throw ();
extern int putchar_unlocked (int __c) throw ();
extern int getw (FILE *__stream) throw ();
extern int putw (int __w, FILE *__stream) throw ();
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) throw ();
extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) throw ();
extern char *gets (char *__s) throw ();
# 413 "/usr/include/stdio.h" 3
extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) throw ();
extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) throw ();
extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) throw ();
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream) throw ();
extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream) throw ();
extern int puts (__const char *__s) throw ();
extern int ungetc (int __c, FILE *__stream) throw ();
extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) throw ();
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) throw ();
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) throw ();
extern int fseek (FILE *__stream, long int __off, int __whence) throw ();
extern long int ftell (FILE *__stream) throw ();
extern void rewind (FILE *__stream) throw ();
# 493 "/usr/include/stdio.h" 3
extern int fseeko (FILE *__stream, __off_t __off, int __whence) throw ();
extern __off_t ftello (FILE *__stream) throw ();
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) throw ();
extern int fsetpos (FILE *__stream, __const fpos_t *__pos) throw ();
# 527 "/usr/include/stdio.h" 3
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence) throw ();
extern __off64_t ftello64 (FILE *__stream) throw ();
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos) throw ();
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos) throw ();
extern void clearerr (FILE *__stream) throw ();
extern int feof (FILE *__stream) throw ();
extern int ferror (FILE *__stream) throw ();
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw ();
extern int ferror_unlocked (FILE *__stream) throw ();
extern void perror (__const char *__s) throw ();
extern int sys_nerr;
extern __const char *__const sys_errlist[];
extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
extern int fileno (FILE *__stream) throw ();
extern int fileno_unlocked (FILE *__stream) throw ();
extern FILE *popen (__const char *__command, __const char *__modes) throw ();
extern int pclose (FILE *__stream) throw ();
extern char *ctermid (char *__s) throw ();
extern char *cuserid (char *__s) throw ();
struct obstack;
extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw ();
extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw ();
# 614 "/usr/include/stdio.h" 3
extern void flockfile (FILE *__stream) throw ();
extern int ftrylockfile (FILE *__stream) throw ();
extern void funlockfile (FILE *__stream) throw ();
# 638 "/usr/include/stdio.h" 3
}
# 42 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 2 3
# 86 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 3
namespace std
{
using ::FILE;
using ::fpos_t;
using ::clearerr;
using ::fclose;
using ::feof;
using ::ferror;
using ::fflush;
using ::fgetc;
using ::fgetpos;
using ::fgets;
using ::fopen;
using ::fprintf;
using ::fputc;
using ::fputs;
using ::fread;
using ::freopen;
using ::fscanf;
using ::fseek;
using ::fsetpos;
using ::ftell;
using ::fwrite;
using ::getc;
using ::getchar;
using ::gets;
using ::perror;
using ::printf;
using ::putc;
using ::putchar;
using ::puts;
using ::remove;
using ::rename;
using ::rewind;
using ::scanf;
using ::setbuf;
using ::setvbuf;
using ::sprintf;
using ::sscanf;
using ::tmpfile;
using ::tmpnam;
using ::ungetc;
using ::vfprintf;
using ::vprintf;
using ::vsprintf;
}
# 142 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstdio.h" 3
namespace __gnu_cxx
{
using ::snprintf;
using ::vfscanf;
using ::vscanf;
using ::vsnprintf;
using ::vsscanf;
}
namespace std
{
using __gnu_cxx::snprintf;
using __gnu_cxx::vfscanf;
using __gnu_cxx::vscanf;
using __gnu_cxx::vsnprintf;
using __gnu_cxx::vsscanf;
}
# 32 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cstdio" 2 3
# 36 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/cstddef" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/gthr.h" 1 3
# 102 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/gthr.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/gthr-single.h" 1 3
# 34 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/gthr-single.h" 3
typedef int __gthread_mutex_t;
# 211 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/gthr-single.h" 3
static inline int
__gthread_active_p (void)
{
return 0;
}
static inline int
__gthread_mutex_lock (__gthread_mutex_t * )
{
return 0;
}
static inline int
__gthread_mutex_trylock (__gthread_mutex_t * )
{
return 0;
}
static inline int
__gthread_mutex_unlock (__gthread_mutex_t * )
{
return 0;
}
# 103 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/gthr.h" 2 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h" 2 3
namespace std
{
typedef long streamoff;
typedef ptrdiff_t streamsize;
typedef fpos_t __c_streampos;
typedef __gthread_mutex_t __c_lock;
typedef FILE __c_file_type;
struct __ios_flags
{
typedef short __int_type;
static const __int_type _S_boolalpha = 0x0001;
static const __int_type _S_dec = 0x0002;
static const __int_type _S_fixed = 0x0004;
static const __int_type _S_hex = 0x0008;
static const __int_type _S_internal = 0x0010;
static const __int_type _S_left = 0x0020;
static const __int_type _S_oct = 0x0040;
static const __int_type _S_right = 0x0080;
static const __int_type _S_scientific = 0x0100;
static const __int_type _S_showbase = 0x0200;
static const __int_type _S_showpoint = 0x0400;
static const __int_type _S_showpos = 0x0800;
static const __int_type _S_skipws = 0x1000;
static const __int_type _S_unitbuf = 0x2000;
static const __int_type _S_uppercase = 0x4000;
static const __int_type _S_adjustfield = 0x0020 | 0x0080 | 0x0010;
static const __int_type _S_basefield = 0x0002 | 0x0040 | 0x0008;
static const __int_type _S_floatfield = 0x0100 | 0x0004;
static const __int_type _S_badbit = 0x01;
static const __int_type _S_eofbit = 0x02;
static const __int_type _S_failbit = 0x04;
static const __int_type _S_app = 0x01;
static const __int_type _S_ate = 0x02;
static const __int_type _S_bin = 0x04;
static const __int_type _S_in = 0x08;
static const __int_type _S_out = 0x10;
static const __int_type _S_trunc = 0x20;
};
}
# 40 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/fpos.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cwchar.h" 1 3
# 37 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cwchar.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 38 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cwchar.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 1 3
# 39 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cwchar.h" 2 3
# 42 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cwchar.h" 3
# 1 "/usr/include/wchar.h" 1 3
# 27 "/usr/include/wchar.h" 3
# 1 "/usr/include/features.h" 1 3
# 28 "/usr/include/wchar.h" 2 3
# 1 "/usr/include/stdio.h" 1 3
# 32 "/usr/include/wchar.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/include/stddef.h" 1 3
# 39 "/usr/include/wchar.h" 2 3
# 53 "/usr/include/wchar.h" 3
typedef struct
{
int count;
wint_t value;
} mbstate_t;
# 77 "/usr/include/wchar.h" 3
struct tm;
extern "C" {
extern wchar_t *wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw ();
extern wchar_t *wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw ();
extern wchar_t *wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw ();
extern wchar_t *wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw ();
extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw ();
extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw ();
# 1 "/usr/include/xlocale.h" 1 3
# 113 "/usr/include/wchar.h" 2 3
extern int __wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) throw ();
extern int __wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) throw ();
extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw ();
extern size_t wcsxfrm (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw ();
# 136 "/usr/include/wchar.h" 3
extern int __wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) throw ();
extern size_t __wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) throw ();
extern wchar_t *wcsdup (__const wchar_t *__s) throw ();
extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) throw ();
extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) throw ();
extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) throw ();
extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) throw ();
extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) throw ();
extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) throw ();
# 174 "/usr/include/wchar.h" 3
extern wchar_t *wcstok (wchar_t *__restrict __s, __const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) throw ();
extern size_t __wcslen (__const wchar_t *__s) throw ();
extern size_t wcslen (__const wchar_t *__s) throw ();
extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) throw ();
extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) throw ();
extern int wmemcmp (__const wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw ();
extern wchar_t *wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw ();
extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw ();
extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw ();
extern wint_t btowc (int __c) throw ();
extern int wctob (wint_t __c) throw ();
extern int mbsinit (__const mbstate_t *__ps) throw ();
extern size_t mbrtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n, mbstate_t *__p) throw ();
extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) throw ();
extern size_t __mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw ();
extern size_t mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw ();
# 247 "/usr/include/wchar.h" 3
extern size_t mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw ();
extern size_t wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw ();
extern size_t mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw ();
extern size_t wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw ();
# 277 "/usr/include/wchar.h" 3
extern int wcwidth (wint_t __c) throw ();
extern int wcswidth (__const wchar_t *__s, size_t __n) throw ();
extern double wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw ();
extern float wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw ();
extern long double wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw ();
extern long int wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ();
extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ();
__extension__
extern long long int wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ();
__extension__
extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ();
__extension__
extern long long int wcstoll (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ();
__extension__
extern unsigned long long int wcstoull (__const wchar_t * __restrict __nptr, wchar_t **__restrict __endptr, int __base) throw ();
# 355 "/usr/include/wchar.h" 3
# 1 "/usr/include/xlocale.h" 1 3
# 356 "/usr/include/wchar.h" 2 3
extern long int __wcstol_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw ();
extern unsigned long int __wcstoul_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw ();
__extension__
extern long long int __wcstoll_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw ();
__extension__
extern unsigned long long int __wcstoull_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw ();
extern double __wcstod_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw ();
extern float __wcstof_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw ();
extern long double __wcstold_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw ();
extern double __wcstod_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) throw ();
extern float __wcstof_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) throw ();
extern long double __wcstold_internal (__const wchar_t * __restrict __nptr, wchar_t **__restrict __endptr, int __group) throw ();
extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) throw ();
extern unsigned long int __wcstoul_internal (__const wchar_t * __restrict __nptr, wchar_t ** __restrict __endptr, int __base, int __group) throw ();
__extension__
extern long long int __wcstoll_internal (__const wchar_t * __restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) throw ();
__extension__
extern unsigned long long int __wcstoull_internal (__const wchar_t * __restrict __nptr, wchar_t ** __restrict __endptr, int __base, int __group) throw ();
# 482 "/usr/include/wchar.h" 3
extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw ();
extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw ();
# 502 "/usr/include/wchar.h" 3
}
# 43 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cwchar.h" 2 3
# 57 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cwchar.h" 3
namespace std
{
using ::mbstate_t;
}
# 41 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/fpos.h" 2 3
namespace std
{
template<typename _StateT>
class fpos
{
public:
typedef _StateT __state_type;
private:
streamoff _M_off;
__state_type _M_st;
public:
__state_type
state() const { return _M_st; }
void
state(__state_type __st) { _M_st = __st; }
fpos(): _M_off(streamoff()), _M_st(__state_type()) { }
fpos(streamoff __off, __state_type __st = __state_type())
: _M_off(__off), _M_st(__st) { }
operator streamoff() const { return _M_off; }
fpos&
operator+=(streamoff __off) { _M_off += __off; return *this; }
fpos&
operator-=(streamoff __off) { _M_off -= __off; return *this; }
fpos
operator+(streamoff __off)
{
fpos __t(*this);
__t += __off;
return __t;
}
fpos
operator-(streamoff __off)
{
fpos __t(*this);
__t -= __off;
return __t;
}
bool
operator==(const fpos& __pos) const
{ return _M_off == __pos._M_off; }
bool
operator!=(const fpos& __pos) const
{ return _M_off != __pos._M_off; }
streamoff
_M_position() const { return _M_off; }
void
_M_position(streamoff __off) { _M_off = __off; }
};
typedef fpos<mbstate_t> streampos;
}
# 42 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_iosfwd.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/functexcept.h" 1 3
# 34 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/functexcept.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/exception_defines.h" 1 3
# 35 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/functexcept.h" 2 3
namespace std
{
void
__throw_bad_exception(void);
void
__throw_bad_alloc(void);
void
__throw_bad_cast(void);
void
__throw_bad_typeid(void);
void
__throw_logic_error(const char* __s);
void
__throw_domain_error(const char* __s);
void
__throw_invalid_argument(const char* __s);
void
__throw_length_error(const char* __s);
void
__throw_out_of_range(const char* __s);
void
__throw_runtime_error(const char* __s);
void
__throw_range_error(const char* __s);
void
__throw_overflow_error(const char* __s);
void
__throw_underflow_error(const char* __s);
void
__throw_ios_failure(const char* __s);
}
# 43 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_iosfwd.h" 2 3
namespace std
{
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ios;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_streambuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_istream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ostream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_iostream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringbuf;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_istringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_ostringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT>,
typename _Alloc = allocator<_CharT> >
class basic_stringstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_filebuf;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ifstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_ofstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class basic_fstream;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class istreambuf_iterator;
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class ostreambuf_iterator;
class ios_base;
typedef basic_ios<char> ios;
typedef basic_streambuf<char> streambuf;
typedef basic_istream<char> istream;
typedef basic_ostream<char> ostream;
typedef basic_iostream<char> iostream;
typedef basic_stringbuf<char> stringbuf;
typedef basic_istringstream<char> istringstream;
typedef basic_ostringstream<char> ostringstream;
typedef basic_stringstream<char> stringstream;
typedef basic_filebuf<char> filebuf;
typedef basic_ifstream<char> ifstream;
typedef basic_ofstream<char> ofstream;
typedef basic_fstream<char> fstream;
# 129 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_iosfwd.h" 3
}
# 78 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator_base_types.h" 1 3
# 69 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator_base_types.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstddef.h" 1 3
# 71 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator_base_types.h" 2 3
namespace std
{
struct input_iterator_tag {};
struct output_iterator_tag {};
struct forward_iterator_tag : public input_iterator_tag {};
struct bidirectional_iterator_tag : public forward_iterator_tag {};
struct random_access_iterator_tag : public bidirectional_iterator_tag {};
template <class _Tp, class _Distance> struct input_iterator {
typedef input_iterator_tag iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
struct output_iterator {
typedef output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
};
template <class _Tp, class _Distance> struct forward_iterator {
typedef forward_iterator_tag iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
template <class _Tp, class _Distance> struct bidirectional_iterator {
typedef bidirectional_iterator_tag iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
template <class _Tp, class _Distance> struct random_access_iterator {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
template <class _Category, class _Tp, class _Distance = ptrdiff_t,
class _Pointer = _Tp*, class _Reference = _Tp&>
struct iterator {
typedef _Category iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Pointer pointer;
typedef _Reference reference;
};
template <class _Iterator>
struct iterator_traits {
typedef typename _Iterator::iterator_category iterator_category;
typedef typename _Iterator::value_type value_type;
typedef typename _Iterator::difference_type difference_type;
typedef typename _Iterator::pointer pointer;
typedef typename _Iterator::reference reference;
};
template <class _Tp>
struct iterator_traits<_Tp*> {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
template <class _Tp>
struct iterator_traits<const _Tp*> {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
};
# 172 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator_base_types.h" 3
template <class _Iter>
inline typename iterator_traits<_Iter>::iterator_category
__iterator_category(const _Iter&)
{
typedef typename iterator_traits<_Iter>::iterator_category _Category;
return _Category();
}
template <class _Iter>
inline typename iterator_traits<_Iter>::difference_type*
__distance_type(const _Iter&)
{
return static_cast<typename iterator_traits<_Iter>::difference_type*>(0);
}
template <class _Iter>
inline typename iterator_traits<_Iter>::value_type*
__value_type(const _Iter&)
{
return static_cast<typename iterator_traits<_Iter>::value_type*>(0);
}
template <class _Iter>
inline typename iterator_traits<_Iter>::iterator_category
iterator_category(const _Iter& __i) { return __iterator_category(__i); }
template <class _Iter>
inline typename iterator_traits<_Iter>::difference_type*
distance_type(const _Iter& __i) { return __distance_type(__i); }
template <class _Iter>
inline typename iterator_traits<_Iter>::value_type*
value_type(const _Iter& __i) { return __value_type(__i); }
}
# 79 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator_base_funcs.h" 1 3
# 69 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator_base_funcs.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/concept_check.h" 1 3
# 34 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/concept_check.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/i686-pc-linux-gnu/bits/c++config.h" 1 3
# 36 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/concept_check.h" 2 3
# 70 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator_base_funcs.h" 2 3
namespace std
{
template <class _InputIterator, class _Distance>
inline void __distance(_InputIterator __first, _InputIterator __last,
_Distance& __n, input_iterator_tag)
{
;
while (__first != __last) { ++__first; ++__n; }
}
template <class _RandomAccessIterator, class _Distance>
inline void __distance(_RandomAccessIterator __first,
_RandomAccessIterator __last,
_Distance& __n, random_access_iterator_tag)
{
;
__n += __last - __first;
}
template <class _InputIterator, class _Distance>
inline void distance(_InputIterator __first,
_InputIterator __last, _Distance& __n)
{
__distance(__first, __last, __n, iterator_category(__first));
}
template <class _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
__distance(_InputIterator __first, _InputIterator __last, input_iterator_tag)
{
;
typename iterator_traits<_InputIterator>::difference_type __n = 0;
while (__first != __last) {
++__first; ++__n;
}
return __n;
}
template <class _RandomAccessIterator>
inline typename iterator_traits<_RandomAccessIterator>::difference_type
__distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
random_access_iterator_tag)
{
;
return __last - __first;
}
template <class _InputIterator>
inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first, _InputIterator __last)
{
typedef typename iterator_traits<_InputIterator>::iterator_category
_Category;
return __distance(__first, __last, _Category());
}
template <class _InputIter, class _Distance>
inline void __advance(_InputIter& __i, _Distance __n, input_iterator_tag)
{
;
while (__n--) ++__i;
}
template <class _BidirectionalIterator, class _Distance>
inline void __advance(_BidirectionalIterator& __i, _Distance __n,
bidirectional_iterator_tag)
{
;
if (__n > 0)
while (__n--) ++__i;
else
while (__n++) --__i;
}
template <class _RandomAccessIterator, class _Distance>
inline void __advance(_RandomAccessIterator& __i, _Distance __n,
random_access_iterator_tag)
{
;
__i += __n;
}
template <class _InputIterator, class _Distance>
inline void advance(_InputIterator& __i, _Distance __n)
{
__advance(__i, __n, iterator_category(__i));
}
}
# 80 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator.h" 1 3
# 63 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator.h" 3
namespace std
{
template <class _Container>
class back_insert_iterator {
protected:
_Container* container;
public:
typedef _Container container_type;
typedef output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit back_insert_iterator(_Container& __x) : container(&__x) {}
back_insert_iterator<_Container>&
operator=(const typename _Container::value_type& __value) {
container->push_back(__value);
return *this;
}
back_insert_iterator<_Container>& operator*() { return *this; }
back_insert_iterator<_Container>& operator++() { return *this; }
back_insert_iterator<_Container>& operator++(int) { return *this; }
};
template <class _Container>
inline back_insert_iterator<_Container> back_inserter(_Container& __x) {
return back_insert_iterator<_Container>(__x);
}
template <class _Container>
class front_insert_iterator {
protected:
_Container* container;
public:
typedef _Container container_type;
typedef output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
explicit front_insert_iterator(_Container& __x) : container(&__x) {}
front_insert_iterator<_Container>&
operator=(const typename _Container::value_type& __value) {
container->push_front(__value);
return *this;
}
front_insert_iterator<_Container>& operator*() { return *this; }
front_insert_iterator<_Container>& operator++() { return *this; }
front_insert_iterator<_Container>& operator++(int) { return *this; }
};
template <class _Container>
inline front_insert_iterator<_Container> front_inserter(_Container& __x) {
return front_insert_iterator<_Container>(__x);
}
template <class _Container>
class insert_iterator {
protected:
_Container* container;
typename _Container::iterator iter;
public:
typedef _Container container_type;
typedef output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
insert_iterator(_Container& __x, typename _Container::iterator __i)
: container(&__x), iter(__i) {}
insert_iterator<_Container>&
operator=(const typename _Container::value_type& __value) {
iter = container->insert(iter, __value);
++iter;
return *this;
}
insert_iterator<_Container>& operator*() { return *this; }
insert_iterator<_Container>& operator++() { return *this; }
insert_iterator<_Container>& operator++(int) { return *this; }
};
template <class _Container, class _Iterator>
inline
insert_iterator<_Container> inserter(_Container& __x, _Iterator __i)
{
typedef typename _Container::iterator __iter;
return insert_iterator<_Container>(__x, __iter(__i));
}
template <class _BidirectionalIterator, class _Tp, class _Reference = _Tp&,
class _Distance = ptrdiff_t>
class reverse_bidirectional_iterator {
typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp,
_Reference, _Distance> _Self;
protected:
_BidirectionalIterator current;
public:
typedef bidirectional_iterator_tag iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Tp* pointer;
typedef _Reference reference;
reverse_bidirectional_iterator() {}
explicit reverse_bidirectional_iterator(_BidirectionalIterator __x)
: current(__x) {}
_BidirectionalIterator base() const { return current; }
_Reference operator*() const {
_BidirectionalIterator __tmp = current;
return *--__tmp;
}
pointer operator->() const { return &(operator*()); }
_Self& operator++() {
--current;
return *this;
}
_Self operator++(int) {
_Self __tmp = *this;
--current;
return __tmp;
}
_Self& operator--() {
++current;
return *this;
}
_Self operator--(int) {
_Self __tmp = *this;
++current;
return __tmp;
}
};
template <class _BiIter, class _Tp, class _Ref, class _Distance>
inline bool operator==(
const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __x,
const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __y)
{
return __x.base() == __y.base();
}
template <class _BiIter, class _Tp, class _Ref, class _Distance>
inline bool operator!=(
const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __x,
const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __y)
{
return !(__x == __y);
}
# 222 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator.h" 3
template <class _Iterator>
class reverse_iterator
{
protected:
_Iterator current;
public:
typedef typename iterator_traits<_Iterator>::iterator_category
iterator_category;
typedef typename iterator_traits<_Iterator>::value_type
value_type;
typedef typename iterator_traits<_Iterator>::difference_type
difference_type;
typedef typename iterator_traits<_Iterator>::pointer
pointer;
typedef typename iterator_traits<_Iterator>::reference
reference;
typedef _Iterator iterator_type;
typedef reverse_iterator<_Iterator> _Self;
public:
reverse_iterator() {}
explicit reverse_iterator(iterator_type __x) : current(__x) {}
reverse_iterator(const _Self& __x) : current(__x.current) {}
template <class _Iter>
reverse_iterator(const reverse_iterator<_Iter>& __x)
: current(__x.base()) {}
iterator_type base() const { return current; }
reference operator*() const {
_Iterator __tmp = current;
return *--__tmp;
}
pointer operator->() const { return &(operator*()); }
_Self& operator++() {
--current;
return *this;
}
_Self operator++(int) {
_Self __tmp = *this;
--current;
return __tmp;
}
_Self& operator--() {
++current;
return *this;
}
_Self operator--(int) {
_Self __tmp = *this;
++current;
return __tmp;
}
_Self operator+(difference_type __n) const {
return _Self(current - __n);
}
_Self& operator+=(difference_type __n) {
current -= __n;
return *this;
}
_Self operator-(difference_type __n) const {
return _Self(current + __n);
}
_Self& operator-=(difference_type __n) {
current += __n;
return *this;
}
reference operator[](difference_type __n) const { return *(*this + __n); }
};
template <class _Iterator>
inline bool operator==(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y) {
return __x.base() == __y.base();
}
template <class _Iterator>
inline bool operator<(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y) {
return __y.base() < __x.base();
}
template <class _Iterator>
inline bool operator!=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y) {
return !(__x == __y);
}
template <class _Iterator>
inline bool operator>(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y) {
return __y < __x;
}
template <class _Iterator>
inline bool operator<=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y) {
return !(__y < __x);
}
template <class _Iterator>
inline bool operator>=(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y) {
return !(__x < __y);
}
template <class _Iterator>
inline typename reverse_iterator<_Iterator>::difference_type
operator-(const reverse_iterator<_Iterator>& __x,
const reverse_iterator<_Iterator>& __y) {
return __y.base() - __x.base();
}
template <class _Iterator>
inline reverse_iterator<_Iterator>
operator+(typename reverse_iterator<_Iterator>::difference_type __n,
const reverse_iterator<_Iterator>& __x) {
return reverse_iterator<_Iterator>(__x.base() - __n);
}
template <class _Tp,
class _CharT = char, class _Traits = char_traits<_CharT>,
class _Dist = ptrdiff_t>
class istream_iterator {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
typedef basic_istream<_CharT, _Traits> istream_type;
typedef input_iterator_tag iterator_category;
typedef _Tp value_type;
typedef _Dist difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
istream_iterator() : _M_stream(0), _M_ok(false) {}
istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); }
reference operator*() const { return _M_value; }
pointer operator->() const { return &(operator*()); }
istream_iterator& operator++() {
_M_read();
return *this;
}
istream_iterator operator++(int) {
istream_iterator __tmp = *this;
_M_read();
return __tmp;
}
bool _M_equal(const istream_iterator& __x) const
{ return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
private:
istream_type* _M_stream;
_Tp _M_value;
bool _M_ok;
void _M_read() {
_M_ok = (_M_stream && *_M_stream) ? true : false;
if (_M_ok) {
*_M_stream >> _M_value;
_M_ok = *_M_stream ? true : false;
}
}
};
template <class _Tp, class _CharT, class _Traits, class _Dist>
inline bool
operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) {
return __x._M_equal(__y);
}
template <class _Tp, class _CharT, class _Traits, class _Dist>
inline bool
operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) {
return !__x._M_equal(__y);
}
template <class _Tp,
class _CharT = char, class _Traits = char_traits<_CharT> >
class ostream_iterator {
public:
typedef _CharT char_type;
typedef _Traits traits_type;
typedef basic_ostream<_CharT, _Traits> ostream_type;
typedef output_iterator_tag iterator_category;
typedef void value_type;
typedef void difference_type;
typedef void pointer;
typedef void reference;
ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
ostream_iterator(ostream_type& __s, const _CharT* __c)
: _M_stream(&__s), _M_string(__c) {}
ostream_iterator<_Tp>& operator=(const _Tp& __value) {
*_M_stream << __value;
if (_M_string) *_M_stream << _M_string;
return *this;
}
ostream_iterator<_Tp>& operator*() { return *this; }
ostream_iterator<_Tp>& operator++() { return *this; }
ostream_iterator<_Tp>& operator++(int) { return *this; }
private:
ostream_type* _M_stream;
const _CharT* _M_string;
};
# 446 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_iterator.h" 3
template<typename _Iterator, typename _Container>
class __normal_iterator
: public iterator<iterator_traits<_Iterator>::iterator_category,
iterator_traits<_Iterator>::value_type,
iterator_traits<_Iterator>::difference_type,
iterator_traits<_Iterator>::pointer,
iterator_traits<_Iterator>::reference>
{
protected:
_Iterator _M_current;
public:
typedef __normal_iterator<_Iterator, _Container> normal_iterator_type;
typedef iterator_traits<_Iterator> __traits_type;
typedef typename __traits_type::iterator_category iterator_category;
typedef typename __traits_type::value_type value_type;
typedef typename __traits_type::difference_type difference_type;
typedef typename __traits_type::pointer pointer;
typedef typename __traits_type::reference reference;
__normal_iterator() : _M_current(_Iterator()) { }
explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
template<typename _Iter>
inline __normal_iterator(const __normal_iterator<_Iter, _Container>& __i)
: _M_current(__i.base()) { }
reference
operator*() const { return *_M_current; }
pointer
operator->() const { return _M_current; }
normal_iterator_type&
operator++() { ++_M_current; return *this; }
normal_iterator_type
operator++(int) { return __normal_iterator(_M_current++); }
normal_iterator_type&
operator--() { --_M_current; return *this; }
normal_iterator_type
operator--(int) { return __normal_iterator(_M_current--); }
reference
operator[](const difference_type& __n) const
{ return _M_current[__n]; }
normal_iterator_type&
operator+=(const difference_type& __n)
{ _M_current += __n; return *this; }
normal_iterator_type
operator+(const difference_type& __n) const
{ return __normal_iterator(_M_current + __n); }
normal_iterator_type&
operator-=(const difference_type& __n)
{ _M_current -= __n; return *this; }
normal_iterator_type
operator-(const difference_type& __n) const
{ return __normal_iterator(_M_current - __n); }
difference_type
operator-(const normal_iterator_type& __i) const
{ return _M_current - __i._M_current; }
const _Iterator&
base() const { return _M_current; }
};
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() == __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return !(__lhs == __rhs); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __lhs.base() < __rhs.base(); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return __rhs < __lhs; }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return !(__rhs < __lhs); }
template<typename _IteratorL, typename _IteratorR, typename _Container>
inline bool
operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
const __normal_iterator<_IteratorR, _Container>& __rhs)
{ return !(__lhs < __rhs); }
template<typename _Iterator, typename _Container>
inline __normal_iterator<_Iterator, _Container>
operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n,
const __normal_iterator<_Iterator, _Container>& __i)
{ return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
}
# 81 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/concept_check.h" 1 3
# 82 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 2 3
namespace std
{
template <class _ForwardIter1, class _ForwardIter2, class _Tp>
inline void __iter_swap(_ForwardIter1 __a, _ForwardIter2 __b, _Tp*)
{
_Tp __tmp = *__a;
*__a = *__b;
*__b = __tmp;
}
template <class _ForwardIter1, class _ForwardIter2>
inline void iter_swap(_ForwardIter1 __a, _ForwardIter2 __b)
{
;
;
;
;
__iter_swap(__a, __b, __value_type(__a));
}
template <class _Tp>
inline void swap(_Tp& __a, _Tp& __b)
{
;
_Tp __tmp = __a;
__a = __b;
__b = __tmp;
}
template <class _Tp>
inline const _Tp& min(const _Tp& __a, const _Tp& __b) {
;
if (__b < __a) return __b; return __a;
}
template <class _Tp>
inline const _Tp& max(const _Tp& __a, const _Tp& __b) {
;
if (__a < __b) return __b; return __a;
}
template <class _Tp, class _Compare>
inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) {
if (__comp(__b, __a)) return __b; return __a;
}
template <class _Tp, class _Compare>
inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) {
if (__comp(__a, __b)) return __b; return __a;
}
# 166 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algobase.h" 3
template <class _InputIter, class _OutputIter, class _Distance>
inline _OutputIter __copy(_InputIter __first, _InputIter __last,
_OutputIter __result,
input_iterator_tag, _Distance*)
{
for ( ; __first != __last; ++__result, ++__first)
*__result = *__first;
return __result;
}
template <class _RandomAccessIter, class _OutputIter, class _Distance>
inline _OutputIter
__copy(_RandomAccessIter __first, _RandomAccessIter __last,
_OutputIter __result, random_access_iterator_tag, _Distance*)
{
for (_Distance __n = __last - __first; __n > 0; --__n) {
*__result = *__first;
++__first;
++__result;
}
return __result;
}
template <class _Tp>
inline _Tp*
__copy_trivial(const _Tp* __first, const _Tp* __last, _Tp* __result)
{
memmove(__result, __first, sizeof(_Tp) * (__last - __first));
return __result + (__last - __first);
}
template <class _InputIter, class _OutputIter>
inline _OutputIter __copy_aux2(_InputIter __first, _InputIter __last,
_OutputIter __result, __false_type)
{
return __copy(__first, __last, __result,
__iterator_category(__first),
__distance_type(__first));
}
template <class _InputIter, class _OutputIter>
inline _OutputIter __copy_aux2(_InputIter __first, _InputIter __last,
_OutputIter __result, __true_type)
{
return __copy(__first, __last, __result,
__iterator_category(__first),
__distance_type(__first));
}
template <class _Tp>
inline _Tp* __copy_aux2(_Tp* __first, _Tp* __last, _Tp* __result,
__true_type)
{
return __copy_trivial(__first, __last, __result);
}
template <class _Tp>
inline _Tp* __copy_aux2(const _Tp* __first, const _Tp* __last, _Tp* __result,
__true_type)
{
return __copy_trivial(__first, __last, __result);
}
template <class _InputIter, class _OutputIter, class _Tp>
inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last,
_OutputIter __result, _Tp*)
{
typedef typename __type_traits<_Tp>::has_trivial_assignment_operator
_Trivial;
return __copy_aux2(__first, __last, __result, _Trivial());
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter __copy_ni2(_InputIter __first, _InputIter __last,
_OutputIter __result, __true_type)
{
return _OutputIter(__copy_aux(__first, __last, __result.base(),
__value_type(__first)));
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter __copy_ni2(_InputIter __first, _InputIter __last,
_OutputIter __result, __false_type)
{
return __copy_aux(__first, __last, __result, __value_type(__first));
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter __copy_ni1(_InputIter __first, _InputIter __last,
_OutputIter __result, __true_type)
{
typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
return __copy_ni2(__first.base(), __last.base(), __result, __Normal());
}
template<typename _InputIter, typename _OutputIter>
inline _OutputIter __copy_ni1(_InputIter __first, _InputIter __last,
_OutputIter __result, __false_type)
{
typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
return __copy_ni2(__first, __last, __result, __Normal());
}
template <class _InputIter, class _OutputIter>
inline _OutputIter copy(_InputIter __first, _InputIter __last,
_OutputIter __result)
{
;
;
typedef typename _Is_normal_iterator<_InputIter>::_Normal __Normal;
return __copy_ni1(__first, __last, __result, __Normal());
}
template <class _BidirectionalIter1, class _BidirectionalIter2,
class _Distance>
inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first,
_BidirectionalIter1 __last,
_BidirectionalIter2 __result,
bidirectional_iterator_tag,
_Distance*)
{
while (__first != __last)
*--__result = *--__last;
return __result;
}
template <class _RandomAccessIter, class _BidirectionalIter, class _Distance>
inline _BidirectionalIter __copy_backward(_RandomAccessIter __first,
_RandomAccessIter __last,
_BidirectionalIter __result,
random_access_iterator_tag,
_Distance*)
{
for (_Distance __n = __last - __first; __n > 0; --__n)
*--__result = *--__last;
return __result;
}
template <class _BidirectionalIter1, class _BidirectionalIter2,
class _BoolType>
struct __copy_backward_dispatch
{
typedef typename iterator_traits<_BidirectionalIter1>::iterator_category
_Cat;
typedef typename iterator_traits<_BidirectionalIter1>::difference_type
_Distance;
static _BidirectionalIter2 copy(_BidirectionalIter1 __first,
_BidirectionalIter1 __last,
_BidirectionalIter2 __result) {
return __copy_backward(__first, __last, __result, _Cat(), (_Distance*) 0);
}
};
template <class _Tp>
struct __copy_backward_dispatch<_Tp*, _Tp*, __true_type>
{
static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) {
const ptrdiff_t _Num = __last - __first;
memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
return __result - _Num;
}
};
template <class _Tp>
struct __copy_backward_dispatch<const _Tp*, _Tp*, __true_type>
{
static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) {
return __copy_backward_dispatch<_Tp*, _Tp*, __true_type>
::copy(__first, __last, __result);
}
};
template <class _BI1, class _BI2>
inline _BI2 __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result) {
typedef typename __type_traits<typename iterator_traits<_BI2>::value_type>
::has_trivial_assignment_operator
_Trivial;
return __copy_backward_dispatch<_BI1, _BI2, _Trivial>
::copy(__first, __last, __result);
}
template <typename _BI1, typename _BI2>
inline _BI2 __copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __true_type) {
return _BI2(__copy_backward_aux(__first, __last, __result.base()));
}
template <typename _BI1, typename _BI2>
inline _BI2 __copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __false_type){
return __copy_backward_aux(__first, __last, __result);
}
template <typename _BI1, typename _BI2>
inline _BI2 __copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __true_type) {
typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
return __copy_backward_output_normal_iterator(__first.base(), __last.base(),
__result, __Normal());
}
template <typename _BI1, typename _BI2>
inline _BI2 __copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last,
_BI2 __result, __false_type) {
typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
return __copy_backward_output_normal_iterator(__first, __last, __result,
__Normal());
}
template <typename _BI1, typename _BI2>
inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
{
;
;
;
typedef typename _Is_normal_iterator<_BI1>::_Normal __Normal;
return __copy_backward_input_normal_iterator(__first, __last, __result,
__Normal());
}
template <class _InputIter, class _Size, class _OutputIter>
pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count,
_OutputIter __result,
input_iterator_tag) {
for ( ; __count > 0; --__count) {
*__result = *__first;
++__first;
++__result;
}
return pair<_InputIter, _OutputIter>(__first, __result);
}
template <class _RAIter, class _Size, class _OutputIter>
inline pair<_RAIter, _OutputIter>
__copy_n(_RAIter __first, _Size __count,
_OutputIter __result,
random_access_iterator_tag) {
_RAIter __last = __first + __count;
return pair<_RAIter, _OutputIter>(__last, copy(__first, __last, __result));
}
template <class _InputIter, class _Size, class _OutputIter>
inline pair<_InputIter, _OutputIter>
__copy_n(_InputIter __first, _Size __count, _OutputIter __result) {
return __copy_n(__first, __count, __result,
__iterator_category(__first));
}
template <class _InputIter, class _Size, class _OutputIter>
inline pair<_InputIter, _OutputIter>
copy_n(_InputIter __first, _Size __count, _OutputIter __result)
{
;
;
return __copy_n(__first, __count, __result);
}
template <class _ForwardIter, class _Tp>
void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value)
{
;
for ( ; __first != __last; ++__first)
*__first = __value;
}
template <class _OutputIter, class _Size, class _Tp>
_OutputIter fill_n(_OutputIter __first, _Size __n, const _Tp& __value)
{
;
for ( ; __n > 0; --__n, ++__first)
*__first = __value;
return __first;
}
inline void fill(unsigned char* __first, unsigned char* __last,
const unsigned char& __c)
{
unsigned char __tmp = __c;
memset(__first, __tmp, __last - __first);
}
inline void fill(signed char* __first, signed char* __last,
const signed char& __c)
{
signed char __tmp = __c;
memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
}
inline void fill(char* __first, char* __last, const char& __c)
{
char __tmp = __c;
memset(__first, static_cast<unsigned char>(__tmp), __last - __first);
}
template <class _Size>
inline unsigned char* fill_n(unsigned char* __first, _Size __n,
const unsigned char& __c)
{
fill(__first, __first + __n, __c);
return __first + __n;
}
template <class _Size>
inline signed char* fill_n(char* __first, _Size __n,
const signed char& __c)
{
fill(__first, __first + __n, __c);
return __first + __n;
}
template <class _Size>
inline char* fill_n(char* __first, _Size __n, const char& __c)
{
fill(__first, __first + __n, __c);
return __first + __n;
}
template <class _InputIter1, class _InputIter2>
pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
_InputIter1 __last1,
_InputIter2 __first2)
{
;
;
;
;
while (__first1 != __last1 && *__first1 == *__first2) {
++__first1;
++__first2;
}
return pair<_InputIter1, _InputIter2>(__first1, __first2);
}
template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
_InputIter1 __last1,
_InputIter2 __first2,
_BinaryPredicate __binary_pred)
{
;
;
while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
++__first1;
++__first2;
}
return pair<_InputIter1, _InputIter2>(__first1, __first2);
}
template <class _InputIter1, class _InputIter2>
inline bool equal(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2)
{
;
;
;
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!(*__first1 == *__first2))
return false;
return true;
}
template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
inline bool equal(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _BinaryPredicate __binary_pred)
{
;
;
for ( ; __first1 != __last1; ++__first1, ++__first2)
if (!__binary_pred(*__first1, *__first2))
return false;
return true;
}
template <class _InputIter1, class _InputIter2>
bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
{
;
;
;
;
for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2) {
if (*__first1 < *__first2)
return true;
if (*__first2 < *__first1)
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
template <class _InputIter1, class _InputIter2, class _Compare>
bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_Compare __comp)
{
;
;
for ( ; __first1 != __last1 && __first2 != __last2
; ++__first1, ++__first2) {
if (__comp(*__first1, *__first2))
return true;
if (__comp(*__first2, *__first1))
return false;
}
return __first1 == __last1 && __first2 != __last2;
}
inline bool
lexicographical_compare(const unsigned char* __first1,
const unsigned char* __last1,
const unsigned char* __first2,
const unsigned char* __last2)
{
const size_t __len1 = __last1 - __first1;
const size_t __len2 = __last2 - __first2;
const int __result = memcmp(__first1, __first2, min(__len1, __len2));
return __result != 0 ? __result < 0 : __len1 < __len2;
}
inline bool lexicographical_compare(const char* __first1, const char* __last1,
const char* __first2, const char* __last2)
{
return lexicographical_compare((const signed char*) __first1,
(const signed char*) __last1,
(const signed char*) __first2,
(const signed char*) __last2);
}
template <class _InputIter1, class _InputIter2>
int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
{
while (__first1 != __last1 && __first2 != __last2) {
if (*__first1 < *__first2)
return -1;
if (*__first2 < *__first1)
return 1;
++__first1;
++__first2;
}
if (__first2 == __last2) {
return !(__first1 == __last1);
}
else {
return -1;
}
}
inline int
__lexicographical_compare_3way(const unsigned char* __first1,
const unsigned char* __last1,
const unsigned char* __first2,
const unsigned char* __last2)
{
const ptrdiff_t __len1 = __last1 - __first1;
const ptrdiff_t __len2 = __last2 - __first2;
const int __result = memcmp(__first1, __first2, min(__len1, __len2));
return __result != 0 ? __result
: (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
}
inline int
__lexicographical_compare_3way(const char* __first1, const char* __last1,
const char* __first2, const char* __last2)
{
return __lexicographical_compare_3way(
(const signed char*) __first1,
(const signed char*) __last1,
(const signed char*) __first2,
(const signed char*) __last2);
}
template <class _InputIter1, class _InputIter2>
int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
{
;
;
;
;
return __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
}
}
# 62 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_algorithm.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_construct.h" 1 3
# 63 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_construct.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/new" 1 3
# 64 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_construct.h" 2 3
namespace std
{
# 76 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_construct.h" 3
template <class _T1, class _T2>
inline void _Construct(_T1* __p, const _T2& __value) {
new ((void*) __p) _T1(__value);
}
template <class _T1>
inline void _Construct(_T1* __p) {
new ((void*) __p) _T1();
}
template <class _Tp>
inline void _Destroy(_Tp* __pointer) {
__pointer->~_Tp();
}
template <class _ForwardIterator>
void
__destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type)
{
for ( ; __first != __last; ++__first)
destroy(&*__first);
}
template <class _ForwardIterator>
inline void __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) {}
template <class _ForwardIterator, class _Tp>
inline void
__destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*)
{
typedef typename __type_traits<_Tp>::has_trivial_destructor
_Trivial_destructor;
__destroy_aux(__first, __last, _Trivial_destructor());
}
template <class _ForwardIterator>
inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) {
__destroy(__first, __last, __value_type(__first));
}
inline void _Destroy(char*, char*) {}
inline void _Destroy(int*, int*) {}
inline void _Destroy(long*, long*) {}
inline void _Destroy(float*, float*) {}
inline void _Destroy(double*, double*) {}
inline void _Destroy(wchar_t*, wchar_t*) {}
template <class _T1, class _T2>
inline void construct(_T1* __p, const _T2& __value) {
_Construct(__p, __value);
}
template <class _T1>
inline void construct(_T1* __p) {
_Construct(__p);
}
template <class _Tp>
inline void destroy(_Tp* __pointer) {
_Destroy(__pointer);
}
template <class _ForwardIterator>
inline void destroy(_ForwardIterator __first, _ForwardIterator __last) {
_Destroy(__first, __last);
}
}
# 63 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_algorithm.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_uninitialized.h" 1 3
# 63 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_uninitialized.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_cstring.h" 1 3
# 64 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_uninitialized.h" 2 3
namespace std
{
template <class _InputIter, class _ForwardIter>
inline _ForwardIter
__uninitialized_copy_aux(_InputIter __first, _InputIter __last,
_ForwardIter __result,
__true_type)
{
return copy(__first, __last, __result);
}
template <class _InputIter, class _ForwardIter>
_ForwardIter
__uninitialized_copy_aux(_InputIter __first, _InputIter __last,
_ForwardIter __result,
__false_type)
{
_ForwardIter __cur = __result;
try {
for ( ; __first != __last; ++__first, ++__cur)
_Construct(&*__cur, *__first);
return __cur;
}
catch(...) { _Destroy(__result, __cur); throw; };
}
template <class _InputIter, class _ForwardIter, class _Tp>
inline _ForwardIter
__uninitialized_copy(_InputIter __first, _InputIter __last,
_ForwardIter __result, _Tp*)
{
typedef typename __type_traits<_Tp>::is_POD_type _Is_POD;
return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
}
template <class _InputIter, class _ForwardIter>
inline _ForwardIter
uninitialized_copy(_InputIter __first, _InputIter __last,
_ForwardIter __result)
{
return __uninitialized_copy(__first, __last, __result,
__value_type(__result));
}
inline char* uninitialized_copy(const char* __first, const char* __last,
char* __result) {
memmove(__result, __first, __last - __first);
return __result + (__last - __first);
}
inline wchar_t*
uninitialized_copy(const wchar_t* __first, const wchar_t* __last,
wchar_t* __result)
{
memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
return __result + (__last - __first);
}
template <class _InputIter, class _Size, class _ForwardIter>
pair<_InputIter, _ForwardIter>
__uninitialized_copy_n(_InputIter __first, _Size __count,
_ForwardIter __result,
input_iterator_tag)
{
_ForwardIter __cur = __result;
try {
for ( ; __count > 0 ; --__count, ++__first, ++__cur)
_Construct(&*__cur, *__first);
return pair<_InputIter, _ForwardIter>(__first, __cur);
}
catch(...) { _Destroy(__result, __cur); throw; };
}
template <class _RandomAccessIter, class _Size, class _ForwardIter>
inline pair<_RandomAccessIter, _ForwardIter>
__uninitialized_copy_n(_RandomAccessIter __first, _Size __count,
_ForwardIter __result,
random_access_iterator_tag) {
_RandomAccessIter __last = __first + __count;
return pair<_RandomAccessIter, _ForwardIter>(
__last,
uninitialized_copy(__first, __last, __result));
}
template <class _InputIter, class _Size, class _ForwardIter>
inline pair<_InputIter, _ForwardIter>
__uninitialized_copy_n(_InputIter __first, _Size __count,
_ForwardIter __result) {
return __uninitialized_copy_n(__first, __count, __result,
__iterator_category(__first));
}
template <class _InputIter, class _Size, class _ForwardIter>
inline pair<_InputIter, _ForwardIter>
uninitialized_copy_n(_InputIter __first, _Size __count,
_ForwardIter __result) {
return __uninitialized_copy_n(__first, __count, __result,
__iterator_category(__first));
}
template <class _ForwardIter, class _Tp>
inline void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
const _Tp& __x, __true_type)
{
fill(__first, __last, __x);
}
template <class _ForwardIter, class _Tp>
void
__uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last,
const _Tp& __x, __false_type)
{
_ForwardIter __cur = __first;
try {
for ( ; __cur != __last; ++__cur)
_Construct(&*__cur, __x);
}
catch(...) { _Destroy(__first, __cur); throw; };
}
template <class _ForwardIter, class _Tp, class _Tp1>
inline void __uninitialized_fill(_ForwardIter __first,
_ForwardIter __last, const _Tp& __x, _Tp1*)
{
typedef typename __type_traits<_Tp1>::is_POD_type _Is_POD;
__uninitialized_fill_aux(__first, __last, __x, _Is_POD());
}
template <class _ForwardIter, class _Tp>
inline void uninitialized_fill(_ForwardIter __first,
_ForwardIter __last,
const _Tp& __x)
{
__uninitialized_fill(__first, __last, __x, __value_type(__first));
}
template <class _ForwardIter, class _Size, class _Tp>
inline _ForwardIter
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
const _Tp& __x, __true_type)
{
return fill_n(__first, __n, __x);
}
template <class _ForwardIter, class _Size, class _Tp>
_ForwardIter
__uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
const _Tp& __x, __false_type)
{
_ForwardIter __cur = __first;
try {
for ( ; __n > 0; --__n, ++__cur)
_Construct(&*__cur, __x);
return __cur;
}
catch(...) { _Destroy(__first, __cur); throw; };
}
template <class _ForwardIter, class _Size, class _Tp, class _Tp1>
inline _ForwardIter
__uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x, _Tp1*)
{
typedef typename __type_traits<_Tp1>::is_POD_type _Is_POD;
return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
}
template <class _ForwardIter, class _Size, class _Tp>
inline _ForwardIter
uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x)
{
return __uninitialized_fill_n(__first, __n, __x, __value_type(__first));
}
# 260 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_uninitialized.h" 3
template <class _InputIter1, class _InputIter2, class _ForwardIter>
inline _ForwardIter
__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_ForwardIter __result)
{
_ForwardIter __mid = uninitialized_copy(__first1, __last1, __result);
try {
return uninitialized_copy(__first2, __last2, __mid);
}
catch(...) { _Destroy(__result, __mid); throw; };
}
template <class _ForwardIter, class _Tp, class _InputIter>
inline _ForwardIter
__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid,
const _Tp& __x,
_InputIter __first, _InputIter __last)
{
uninitialized_fill(__result, __mid, __x);
try {
return uninitialized_copy(__first, __last, __mid);
}
catch(...) { _Destroy(__result, __mid); throw; };
}
template <class _InputIter, class _ForwardIter, class _Tp>
inline void
__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1,
_ForwardIter __first2, _ForwardIter __last2,
const _Tp& __x)
{
_ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2);
try {
uninitialized_fill(__mid2, __last2, __x);
}
catch(...) { _Destroy(__first2, __mid2); throw; };
}
}
# 64 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_algorithm.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_tempbuf.h" 1 3
# 63 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_tempbuf.h" 3
namespace std
{
template <class _Tp>
pair<_Tp*, ptrdiff_t>
__get_temporary_buffer(ptrdiff_t __len, _Tp*)
{
if (__len > ptrdiff_t(2147483647 / sizeof(_Tp)))
__len = 2147483647 / sizeof(_Tp);
while (__len > 0) {
_Tp* __tmp = (_Tp*) malloc((size_t)__len * sizeof(_Tp));
if (__tmp != 0)
return pair<_Tp*, ptrdiff_t>(__tmp, __len);
__len /= 2;
}
return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0);
}
template <class _Tp>
inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) {
return __get_temporary_buffer(__len, (_Tp*) 0);
}
template <class _Tp>
inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len, _Tp*) {
return __get_temporary_buffer(__len, (_Tp*) 0);
}
template <class _Tp>
void return_temporary_buffer(_Tp* __p) {
free(__p);
}
template <class _ForwardIterator, class _Tp>
class _Temporary_buffer {
private:
ptrdiff_t _M_original_len;
ptrdiff_t _M_len;
_Tp* _M_buffer;
void _M_allocate_buffer() {
_M_original_len = _M_len;
_M_buffer = 0;
if (_M_len > (ptrdiff_t)(2147483647 / sizeof(_Tp)))
_M_len = 2147483647 / sizeof(_Tp);
while (_M_len > 0) {
_M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp));
if (_M_buffer)
break;
_M_len /= 2;
}
}
void _M_initialize_buffer(const _Tp&, __true_type) {}
void _M_initialize_buffer(const _Tp& val, __false_type) {
uninitialized_fill_n(_M_buffer, _M_len, val);
}
public:
ptrdiff_t size() const { return _M_len; }
ptrdiff_t requested_size() const { return _M_original_len; }
_Tp* begin() { return _M_buffer; }
_Tp* end() { return _M_buffer + _M_len; }
_Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) {
typedef typename __type_traits<_Tp>::has_trivial_default_constructor
_Trivial;
try {
_M_len = 0;
distance(__first, __last, _M_len);
_M_allocate_buffer();
if (_M_len > 0)
_M_initialize_buffer(*__first, _Trivial());
}
catch(...) { free(_M_buffer); _M_buffer = 0; _M_len = 0; throw; };
}
~_Temporary_buffer() {
destroy(_M_buffer, _M_buffer + _M_len);
free(_M_buffer);
}
private:
_Temporary_buffer(const _Temporary_buffer&) {}
void operator=(const _Temporary_buffer&) {}
};
template <class _ForwardIterator,
class _Tp
= typename iterator_traits<_ForwardIterator>::value_type
>
struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
{
temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
: _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {}
~temporary_buffer() {}
};
}
# 65 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_algorithm.h" 2 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algo.h" 1 3
# 63 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algo.h" 3
# 1 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_heap.h" 1 3
# 62 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_heap.h" 3
namespace std
{
template <class _RandomAccessIterator, class _Distance, class _Tp>
void
__push_heap(_RandomAccessIterator __first,
_Distance __holeIndex, _Distance __topIndex, _Tp __value)
{
_Distance __parent = (__holeIndex - 1) / 2;
while (__holeIndex > __topIndex && *(__first + __parent) < __value) {
*(__first + __holeIndex) = *(__first + __parent);
__holeIndex = __parent;
__parent = (__holeIndex - 1) / 2;
}
*(__first + __holeIndex) = __value;
}
template <class _RandomAccessIterator, class _Distance, class _Tp>
inline void
__push_heap_aux(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Distance*, _Tp*)
{
__push_heap(__first, _Distance((__last - __first) - 1), _Distance(0),
_Tp(*(__last - 1)));
}
template <class _RandomAccessIterator>
inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
;
;
__push_heap_aux(__first, __last,
__distance_type(__first), __value_type(__first));
}
template <class _RandomAccessIterator, class _Distance, class _Tp,
class _Compare>
void
__push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __topIndex, _Tp __value, _Compare __comp)
{
_Distance __parent = (__holeIndex - 1) / 2;
while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) {
*(__first + __holeIndex) = *(__first + __parent);
__holeIndex = __parent;
__parent = (__holeIndex - 1) / 2;
}
*(__first + __holeIndex) = __value;
}
template <class _RandomAccessIterator, class _Compare,
class _Distance, class _Tp>
inline void
__push_heap_aux(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp,
_Distance*, _Tp*)
{
__push_heap(__first, _Distance((__last - __first) - 1), _Distance(0),
_Tp(*(__last - 1)), __comp);
}
template <class _RandomAccessIterator, class _Compare>
inline void
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp)
{
;
__push_heap_aux(__first, __last, __comp,
__distance_type(__first), __value_type(__first));
}
template <class _RandomAccessIterator, class _Distance, class _Tp>
void
__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __len, _Tp __value)
{
_Distance __topIndex = __holeIndex;
_Distance __secondChild = 2 * __holeIndex + 2;
while (__secondChild < __len) {
if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
__secondChild--;
*(__first + __holeIndex) = *(__first + __secondChild);
__holeIndex = __secondChild;
__secondChild = 2 * (__secondChild + 1);
}
if (__secondChild == __len) {
*(__first + __holeIndex) = *(__first + (__secondChild - 1));
__holeIndex = __secondChild - 1;
}
__push_heap(__first, __holeIndex, __topIndex, __value);
}
template <class _RandomAccessIterator, class _Tp, class _Distance>
inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomAccessIterator __result, _Tp __value, _Distance*)
{
*__result = *__first;
__adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value);
}
template <class _RandomAccessIterator, class _Tp>
inline void
__pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Tp*)
{
__pop_heap(__first, __last - 1, __last - 1,
_Tp(*(__last - 1)), __distance_type(__first));
}
template <class _RandomAccessIterator>
inline void pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last)
{
;
;
__pop_heap_aux(__first, __last, __value_type(__first));
}
template <class _RandomAccessIterator, class _Distance,
class _Tp, class _Compare>
void
__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
_Distance __len, _Tp __value, _Compare __comp)
{
_Distance __topIndex = __holeIndex;
_Distance __secondChild = 2 * __holeIndex + 2;
while (__secondChild < __len) {
if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1))))
__secondChild--;
*(__first + __holeIndex) = *(__first + __secondChild);
__holeIndex = __secondChild;
__secondChild = 2 * (__secondChild + 1);
}
if (__secondChild == __len) {
*(__first + __holeIndex) = *(__first + (__secondChild - 1));
__holeIndex = __secondChild - 1;
}
__push_heap(__first, __holeIndex, __topIndex, __value, __comp);
}
template <class _RandomAccessIterator, class _Tp, class _Compare,
class _Distance>
inline void
__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_RandomAccessIterator __result, _Tp __value, _Compare __comp,
_Distance*)
{
*__result = *__first;
__adjust_heap(__first, _Distance(0), _Distance(__last - __first),
__value, __comp);
}
template <class _RandomAccessIterator, class _Tp, class _Compare>
inline void
__pop_heap_aux(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Tp*, _Compare __comp)
{
__pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp,
__distance_type(__first));
}
template <class _RandomAccessIterator, class _Compare>
inline void
pop_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
;
__pop_heap_aux(__first, __last, __value_type(__first), __comp);
}
template <class _RandomAccessIterator, class _Tp, class _Distance>
void
__make_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Tp*, _Distance*)
{
if (__last - __first < 2) return;
_Distance __len = __last - __first;
_Distance __parent = (__len - 2)/2;
while (true) {
__adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)));
if (__parent == 0) return;
__parent--;
}
}
template <class _RandomAccessIterator>
inline void
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
;
;
__make_heap(__first, __last,
__value_type(__first), __distance_type(__first));
}
template <class _RandomAccessIterator, class _Compare,
class _Tp, class _Distance>
void
__make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
_Compare __comp, _Tp*, _Distance*)
{
if (__last - __first < 2) return;
_Distance __len = __last - __first;
_Distance __parent = (__len - 2)/2;
while (true) {
__adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)),
__comp);
if (__parent == 0) return;
__parent--;
}
}
template <class _RandomAccessIterator, class _Compare>
inline void
make_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
;
__make_heap(__first, __last, __comp,
__value_type(__first), __distance_type(__first));
}
template <class _RandomAccessIterator>
void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
;
;
while (__last - __first > 1)
pop_heap(__first, __last--);
}
template <class _RandomAccessIterator, class _Compare>
void
sort_heap(_RandomAccessIterator __first,
_RandomAccessIterator __last, _Compare __comp)
{
;
while (__last - __first > 1)
pop_heap(__first, __last--, __comp);
}
}
# 64 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algo.h" 2 3
namespace std
{
template <class _Tp>
inline const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c)
{
;
if (__a < __b)
if (__b < __c)
return __b;
else if (__a < __c)
return __c;
else
return __a;
else if (__a < __c)
return __a;
else if (__b < __c)
return __c;
else
return __b;
}
template <class _Tp, class _Compare>
inline const _Tp&
__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp)
{
;
if (__comp(__a, __b))
if (__comp(__b, __c))
return __b;
else if (__comp(__a, __c))
return __c;
else
return __a;
else if (__comp(__a, __c))
return __a;
else if (__comp(__b, __c))
return __c;
else
return __b;
}
template <class _InputIter, class _Function>
_Function for_each(_InputIter __first, _InputIter __last, _Function __f)
{
;
for ( ; __first != __last; ++__first)
__f(*__first);
return __f;
}
template <class _InputIter, class _Tp>
inline _InputIter find(_InputIter __first, _InputIter __last,
const _Tp& __val,
input_iterator_tag)
{
while (__first != __last && !(*__first == __val))
++__first;
return __first;
}
template <class _InputIter, class _Predicate>
inline _InputIter find_if(_InputIter __first, _InputIter __last,
_Predicate __pred,
input_iterator_tag)
{
while (__first != __last && !__pred(*__first))
++__first;
return __first;
}
template <class _RandomAccessIter, class _Tp>
_RandomAccessIter find(_RandomAccessIter __first, _RandomAccessIter __last,
const _Tp& __val,
random_access_iterator_tag)
{
typename iterator_traits<_RandomAccessIter>::difference_type __trip_count
= (__last - __first) >> 2;
for ( ; __trip_count > 0 ; --__trip_count) {
if (*__first == __val) return __first;
++__first;
if (*__first == __val) return __first;
++__first;
if (*__first == __val) return __first;
++__first;
if (*__first == __val) return __first;
++__first;
}
switch(__last - __first) {
case 3:
if (*__first == __val) return __first;
++__first;
case 2:
if (*__first == __val) return __first;
++__first;
case 1:
if (*__first == __val) return __first;
++__first;
case 0:
default:
return __last;
}
}
template <class _RandomAccessIter, class _Predicate>
_RandomAccessIter find_if(_RandomAccessIter __first, _RandomAccessIter __last,
_Predicate __pred,
random_access_iterator_tag)
{
typename iterator_traits<_RandomAccessIter>::difference_type __trip_count
= (__last - __first) >> 2;
for ( ; __trip_count > 0 ; --__trip_count) {
if (__pred(*__first)) return __first;
++__first;
if (__pred(*__first)) return __first;
++__first;
if (__pred(*__first)) return __first;
++__first;
if (__pred(*__first)) return __first;
++__first;
}
switch(__last - __first) {
case 3:
if (__pred(*__first)) return __first;
++__first;
case 2:
if (__pred(*__first)) return __first;
++__first;
case 1:
if (__pred(*__first)) return __first;
++__first;
case 0:
default:
return __last;
}
}
template <class _InputIter, class _Tp>
inline _InputIter find(_InputIter __first, _InputIter __last,
const _Tp& __val)
{
;
;
return find(__first, __last, __val, __iterator_category(__first));
}
template <class _InputIter, class _Predicate>
inline _InputIter find_if(_InputIter __first, _InputIter __last,
_Predicate __pred)
{
;
;
return find_if(__first, __last, __pred, __iterator_category(__first));
}
template <class _ForwardIter>
_ForwardIter adjacent_find(_ForwardIter __first, _ForwardIter __last)
{
;
;
if (__first == __last)
return __last;
_ForwardIter __next = __first;
while(++__next != __last) {
if (*__first == *__next)
return __first;
__first = __next;
}
return __last;
}
template <class _ForwardIter, class _BinaryPredicate>
_ForwardIter adjacent_find(_ForwardIter __first, _ForwardIter __last,
_BinaryPredicate __binary_pred)
{
;
;
if (__first == __last)
return __last;
_ForwardIter __next = __first;
while(++__next != __last) {
if (__binary_pred(*__first, *__next))
return __first;
__first = __next;
}
return __last;
}
template <class _InputIter, class _Tp, class _Size>
void count(_InputIter __first, _InputIter __last, const _Tp& __value,
_Size& __n)
{
;
;
;
for ( ; __first != __last; ++__first)
if (*__first == __value)
++__n;
}
template <class _InputIter, class _Predicate, class _Size>
void count_if(_InputIter __first, _InputIter __last, _Predicate __pred,
_Size& __n)
{
;
;
for ( ; __first != __last; ++__first)
if (__pred(*__first))
++__n;
}
template <class _InputIter, class _Tp>
typename iterator_traits<_InputIter>::difference_type
count(_InputIter __first, _InputIter __last, const _Tp& __value)
{
;
;
;
typename iterator_traits<_InputIter>::difference_type __n = 0;
for ( ; __first != __last; ++__first)
if (*__first == __value)
++__n;
return __n;
}
template <class _InputIter, class _Predicate>
typename iterator_traits<_InputIter>::difference_type
count_if(_InputIter __first, _InputIter __last, _Predicate __pred)
{
;
;
typename iterator_traits<_InputIter>::difference_type __n = 0;
for ( ; __first != __last; ++__first)
if (__pred(*__first))
++__n;
return __n;
}
template <class _ForwardIter1, class _ForwardIter2>
_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2)
{
;
;
;
if (__first1 == __last1 || __first2 == __last2)
return __first1;
_ForwardIter2 __tmp(__first2);
++__tmp;
if (__tmp == __last2)
return find(__first1, __last1, *__first2);
_ForwardIter2 __p1, __p;
__p1 = __first2; ++__p1;
_ForwardIter1 __current = __first1;
while (__first1 != __last1) {
__first1 = find(__first1, __last1, *__first2);
if (__first1 == __last1)
return __last1;
__p = __p1;
__current = __first1;
if (++__current == __last1)
return __last1;
while (*__current == *__p) {
if (++__p == __last2)
return __first1;
if (++__current == __last1)
return __last1;
}
++__first1;
}
return __first1;
}
template <class _ForwardIter1, class _ForwardIter2, class _BinaryPred>
_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2,
_BinaryPred __predicate)
{
;
;
;
if (__first1 == __last1 || __first2 == __last2)
return __first1;
_ForwardIter2 __tmp(__first2);
++__tmp;
if (__tmp == __last2) {
while (__first1 != __last1 && !__predicate(*__first1, *__first2))
++__first1;
return __first1;
}
_ForwardIter2 __p1, __p;
__p1 = __first2; ++__p1;
_ForwardIter1 __current = __first1;
while (__first1 != __last1) {
while (__first1 != __last1) {
if (__predicate(*__first1, *__first2))
break;
++__first1;
}
while (__first1 != __last1 && !__predicate(*__first1, *__first2))
++__first1;
if (__first1 == __last1)
return __last1;
__p = __p1;
__current = __first1;
if (++__current == __last1) return __last1;
while (__predicate(*__current, *__p)) {
if (++__p == __last2)
return __first1;
if (++__current == __last1)
return __last1;
}
++__first1;
}
return __first1;
}
template <class _ForwardIter, class _Integer, class _Tp>
_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
_Integer __count, const _Tp& __val)
{
;
;
;
if (__count <= 0)
return __first;
else {
__first = find(__first, __last, __val);
while (__first != __last) {
_Integer __n = __count - 1;
_ForwardIter __i = __first;
++__i;
while (__i != __last && __n != 0 && *__i == __val) {
++__i;
--__n;
}
if (__n == 0)
return __first;
else
__first = find(__i, __last, __val);
}
return __last;
}
}
template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
_Integer __count, const _Tp& __val,
_BinaryPred __binary_pred)
{
;
;
if (__count <= 0)
return __first;
else {
while (__first != __last) {
if (__binary_pred(*__first, __val))
break;
++__first;
}
while (__first != __last) {
_Integer __n = __count - 1;
_ForwardIter __i = __first;
++__i;
while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) {
++__i;
--__n;
}
if (__n == 0)
return __first;
else {
while (__i != __last) {
if (__binary_pred(*__i, __val))
break;
++__i;
}
__first = __i;
}
}
return __last;
}
}
template <class _ForwardIter1, class _ForwardIter2>
_ForwardIter2 swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2)
{
;
;
;
;
for ( ; __first1 != __last1; ++__first1, ++__first2)
iter_swap(__first1, __first2);
return __first2;
}
template <class _InputIter, class _OutputIter, class _UnaryOperation>
_OutputIter transform(_InputIter __first, _InputIter __last,
_OutputIter __result, _UnaryOperation __unary_op)
{
;
for ( ; __first != __last; ++__first, ++__result)
*__result = __unary_op(*__first);
return __result;
}
template <class _InputIter1, class _InputIter2, class _OutputIter,
class _BinaryOperation>
_OutputIter transform(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _OutputIter __result,
_BinaryOperation __binary_op)
{
;
;
for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
*__result = __binary_op(*__first1, *__first2);
return __result;
}
template <class _ForwardIter, class _Tp>
void replace(_ForwardIter __first, _ForwardIter __last,
const _Tp& __old_value, const _Tp& __new_value)
{
;
;
;
for ( ; __first != __last; ++__first)
if (*__first == __old_value)
*__first = __new_value;
}
template <class _ForwardIter, class _Predicate, class _Tp>
void replace_if(_ForwardIter __first, _ForwardIter __last,
_Predicate __pred, const _Tp& __new_value)
{
;
;
;
for ( ; __first != __last; ++__first)
if (__pred(*__first))
*__first = __new_value;
}
template <class _InputIter, class _OutputIter, class _Tp>
_OutputIter replace_copy(_InputIter __first, _InputIter __last,
_OutputIter __result,
const _Tp& __old_value, const _Tp& __new_value)
{
;
;
;
for ( ; __first != __last; ++__first, ++__result)
*__result = *__first == __old_value ? __new_value : *__first;
return __result;
}
template <class _InputIter, class _OutputIter, class _Predicate, class _Tp>
_OutputIter replace_copy_if(_InputIter __first, _InputIter __last,
_OutputIter __result,
_Predicate __pred, const _Tp& __new_value)
{
;
;
;
for ( ; __first != __last; ++__first, ++__result)
*__result = __pred(*__first) ? __new_value : *__first;
return __result;
}
template <class _ForwardIter, class _Generator>
void generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen)
{
;
;
for ( ; __first != __last; ++__first)
*__first = __gen();
}
template <class _OutputIter, class _Size, class _Generator>
_OutputIter generate_n(_OutputIter __first, _Size __n, _Generator __gen)
{
for ( ; __n > 0; --__n, ++__first)
*__first = __gen();
return __first;
}
template <class _InputIter, class _OutputIter, class _Tp>
_OutputIter remove_copy(_InputIter __first, _InputIter __last,
_OutputIter __result, const _Tp& __value)
{
;
;
;
for ( ; __first != __last; ++__first)
if (!(*__first == __value)) {
*__result = *__first;
++__result;
}
return __result;
}
template <class _InputIter, class _OutputIter, class _Predicate>
_OutputIter remove_copy_if(_InputIter __first, _InputIter __last,
_OutputIter __result, _Predicate __pred)
{
;
;
;
for ( ; __first != __last; ++__first)
if (!__pred(*__first)) {
*__result = *__first;
++__result;
}
return __result;
}
template <class _ForwardIter, class _Tp>
_ForwardIter remove(_ForwardIter __first, _ForwardIter __last,
const _Tp& __value)
{
;
;
;
__first = find(__first, __last, __value);
_ForwardIter __i = __first;
return __first == __last ? __first
: remove_copy(++__i, __last, __first, __value);
}
template <class _ForwardIter, class _Predicate>
_ForwardIter remove_if(_ForwardIter __first, _ForwardIter __last,
_Predicate __pred)
{
;
;
__first = find_if(__first, __last, __pred);
_ForwardIter __i = __first;
return __first == __last ? __first
: remove_copy_if(++__i, __last, __first, __pred);
}
template <class _InputIter, class _OutputIter, class _Tp>
_OutputIter __unique_copy(_InputIter __first, _InputIter __last,
_OutputIter __result, _Tp*)
{
_Tp __value = *__first;
*__result = __value;
while (++__first != __last)
if (!(__value == *__first)) {
__value = *__first;
*++__result = __value;
}
return ++__result;
}
template <class _InputIter, class _OutputIter>
inline _OutputIter __unique_copy(_InputIter __first, _InputIter __last,
_OutputIter __result,
output_iterator_tag)
{
return __unique_copy(__first, __last, __result, __value_type(__first));
}
template <class _InputIter, class _ForwardIter>
_ForwardIter __unique_copy(_InputIter __first, _InputIter __last,
_ForwardIter __result, forward_iterator_tag)
{
*__result = *__first;
while (++__first != __last)
if (!(*__result == *__first))
*++__result = *__first;
return ++__result;
}
template <class _InputIter, class _OutputIter>
inline _OutputIter unique_copy(_InputIter __first, _InputIter __last,
_OutputIter __result)
{
;
;
;
if (__first == __last) return __result;
return __unique_copy(__first, __last, __result,
__iterator_category(__result));
}
template <class _InputIter, class _OutputIter, class _BinaryPredicate,
class _Tp>
_OutputIter __unique_copy(_InputIter __first, _InputIter __last,
_OutputIter __result,
_BinaryPredicate __binary_pred, _Tp*)
{
;
_Tp __value = *__first;
*__result = __value;
while (++__first != __last)
if (!__binary_pred(__value, *__first)) {
__value = *__first;
*++__result = __value;
}
return ++__result;
}
template <class _InputIter, class _OutputIter, class _BinaryPredicate>
inline _OutputIter __unique_copy(_InputIter __first, _InputIter __last,
_OutputIter __result,
_BinaryPredicate __binary_pred,
output_iterator_tag)
{
return __unique_copy(__first, __last, __result, __binary_pred,
__value_type(__first));
}
template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
_ForwardIter __unique_copy(_InputIter __first, _InputIter __last,
_ForwardIter __result,
_BinaryPredicate __binary_pred,
forward_iterator_tag)
{
;
*__result = *__first;
while (++__first != __last)
if (!__binary_pred(*__result, *__first)) *++__result = *__first;
return ++__result;
}
template <class _InputIter, class _OutputIter, class _BinaryPredicate>
inline _OutputIter unique_copy(_InputIter __first, _InputIter __last,
_OutputIter __result,
_BinaryPredicate __binary_pred)
{
;
;
if (__first == __last) return __result;
return __unique_copy(__first, __last, __result, __binary_pred,
__iterator_category(__result));
}
template <class _ForwardIter>
_ForwardIter unique(_ForwardIter __first, _ForwardIter __last)
{
;
;
__first = adjacent_find(__first, __last);
return unique_copy(__first, __last, __first);
}
template <class _ForwardIter, class _BinaryPredicate>
_ForwardIter unique(_ForwardIter __first, _ForwardIter __last,
_BinaryPredicate __binary_pred)
{
;
;
__first = adjacent_find(__first, __last, __binary_pred);
return unique_copy(__first, __last, __first, __binary_pred);
}
template <class _BidirectionalIter>
void __reverse(_BidirectionalIter __first, _BidirectionalIter __last,
bidirectional_iterator_tag) {
while (true)
if (__first == __last || __first == --__last)
return;
else
iter_swap(__first++, __last);
}
template <class _RandomAccessIter>
void __reverse(_RandomAccessIter __first, _RandomAccessIter __last,
random_access_iterator_tag) {
while (__first < __last)
iter_swap(__first++, --__last);
}
template <class _BidirectionalIter>
inline void reverse(_BidirectionalIter __first, _BidirectionalIter __last)
{
;
__reverse(__first, __last, __iterator_category(__first));
}
template <class _BidirectionalIter, class _OutputIter>
_OutputIter reverse_copy(_BidirectionalIter __first,
_BidirectionalIter __last,
_OutputIter __result)
{
;
;
while (__first != __last) {
--__last;
*__result = *__last;
++__result;
}
return __result;
}
template <class _EuclideanRingElement>
_EuclideanRingElement __gcd(_EuclideanRingElement __m,
_EuclideanRingElement __n)
{
while (__n != 0) {
_EuclideanRingElement __t = __m % __n;
__m = __n;
__n = __t;
}
return __m;
}
template <class _ForwardIter, class _Distance>
_ForwardIter __rotate(_ForwardIter __first,
_ForwardIter __middle,
_ForwardIter __last,
_Distance*,
forward_iterator_tag)
{
if (__first == __middle)
return __last;
if (__last == __middle)
return __first;
_ForwardIter __first2 = __middle;
do {
swap(*__first++, *__first2++);
if (__first == __middle)
__middle = __first2;
} while (__first2 != __last);
_ForwardIter __new_middle = __first;
__first2 = __middle;
while (__first2 != __last) {
swap (*__first++, *__first2++);
if (__first == __middle)
__middle = __first2;
else if (__first2 == __last)
__first2 = __middle;
}
return __new_middle;
}
template <class _BidirectionalIter, class _Distance>
_BidirectionalIter __rotate(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last,
_Distance*,
bidirectional_iterator_tag)
{
;
if (__first == __middle)
return __last;
if (__last == __middle)
return __first;
__reverse(__first, __middle, bidirectional_iterator_tag());
__reverse(__middle, __last, bidirectional_iterator_tag());
while (__first != __middle && __middle != __last)
swap (*__first++, *--__last);
if (__first == __middle) {
__reverse(__middle, __last, bidirectional_iterator_tag());
return __last;
}
else {
__reverse(__first, __middle, bidirectional_iterator_tag());
return __first;
}
}
template <class _RandomAccessIter, class _Distance, class _Tp>
_RandomAccessIter __rotate(_RandomAccessIter __first,
_RandomAccessIter __middle,
_RandomAccessIter __last,
_Distance *, _Tp *)
{
;
_Distance __n = __last - __first;
_Distance __k = __middle - __first;
_Distance __l = __n - __k;
_RandomAccessIter __result = __first + (__last - __middle);
if (__k == 0)
return __last;
else if (__k == __l) {
swap_ranges(__first, __middle, __middle);
return __result;
}
_Distance __d = __gcd(__n, __k);
for (_Distance __i = 0; __i < __d; __i++) {
_Tp __tmp = *__first;
_RandomAccessIter __p = __first;
if (__k < __l) {
for (_Distance __j = 0; __j < __l/__d; __j++) {
if (__p > __first + __l) {
*__p = *(__p - __l);
__p -= __l;
}
*__p = *(__p + __k);
__p += __k;
}
}
else {
for (_Distance __j = 0; __j < __k/__d - 1; __j ++) {
if (__p < __last - __k) {
*__p = *(__p + __k);
__p += __k;
}
*__p = * (__p - __l);
__p -= __l;
}
}
*__p = __tmp;
++__first;
}
return __result;
}
template <class _ForwardIter>
inline _ForwardIter rotate(_ForwardIter __first, _ForwardIter __middle,
_ForwardIter __last)
{
;
return __rotate(__first, __middle, __last,
__distance_type(__first),
__iterator_category(__first));
}
template <class _ForwardIter, class _OutputIter>
_OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle,
_ForwardIter __last, _OutputIter __result)
{
;
;
return copy(__first, __middle, copy(__middle, __last, __result));
}
template <class _Distance>
inline _Distance __random_number(_Distance __n) {
return lrand48() % __n;
}
template <class _RandomAccessIter>
inline void random_shuffle(_RandomAccessIter __first,
_RandomAccessIter __last)
{
;
if (__first == __last) return;
for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
iter_swap(__i, __first + __random_number((__i - __first) + 1));
}
template <class _RandomAccessIter, class _RandomNumberGenerator>
void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
_RandomNumberGenerator& __rand)
{
;
if (__first == __last) return;
for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
iter_swap(__i, __first + __rand((__i - __first) + 1));
}
template <class _ForwardIter, class _OutputIter, class _Distance>
_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
_OutputIter __out, const _Distance __n)
{
;
;
_Distance __remaining = 0;
distance(__first, __last, __remaining);
_Distance __m = min(__n, __remaining);
while (__m > 0) {
if (__random_number(__remaining) < __m) {
*__out = *__first;
++__out;
--__m;
}
--__remaining;
++__first;
}
return __out;
}
template <class _ForwardIter, class _OutputIter, class _Distance,
class _RandomNumberGenerator>
_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
_OutputIter __out, const _Distance __n,
_RandomNumberGenerator& __rand)
{
;
;
;
_Distance __remaining = 0;
distance(__first, __last, __remaining);
_Distance __m = min(__n, __remaining);
while (__m > 0) {
if (__rand(__remaining) < __m) {
*__out = *__first;
++__out;
--__m;
}
--__remaining;
++__first;
}
return __out;
}
template <class _InputIter, class _RandomAccessIter, class _Distance>
_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out,
const _Distance __n)
{
_Distance __m = 0;
_Distance __t = __n;
for ( ; __first != __last && __m < __n; ++__m, ++__first)
__out[__m] = *__first;
while (__first != __last) {
++__t;
_Distance __M = __random_number(__t);
if (__M < __n)
__out[__M] = *__first;
++__first;
}
return __out + __m;
}
template <class _InputIter, class _RandomAccessIter,
class _RandomNumberGenerator, class _Distance>
_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out,
_RandomNumberGenerator& __rand,
const _Distance __n)
{
;
_Distance __m = 0;
_Distance __t = __n;
for ( ; __first != __last && __m < __n; ++__m, ++__first)
__out[__m] = *__first;
while (__first != __last) {
++__t;
_Distance __M = __rand(__t);
if (__M < __n)
__out[__M] = *__first;
++__first;
}
return __out + __m;
}
template <class _InputIter, class _RandomAccessIter>
inline _RandomAccessIter
random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out_first, _RandomAccessIter __out_last)
{
;
;
return __random_sample(__first, __last,
__out_first, __out_last - __out_first);
}
template <class _InputIter, class _RandomAccessIter,
class _RandomNumberGenerator>
inline _RandomAccessIter
random_sample(_InputIter __first, _InputIter __last,
_RandomAccessIter __out_first, _RandomAccessIter __out_last,
_RandomNumberGenerator& __rand)
{
;
;
return __random_sample(__first, __last,
__out_first, __rand,
__out_last - __out_first);
}
template <class _ForwardIter, class _Predicate>
_ForwardIter __partition(_ForwardIter __first,
_ForwardIter __last,
_Predicate __pred,
forward_iterator_tag)
{
if (__first == __last) return __first;
while (__pred(*__first))
if (++__first == __last) return __first;
_ForwardIter __next = __first;
while (++__next != __last)
if (__pred(*__next)) {
swap(*__first, *__next);
++__first;
}
return __first;
}
template <class _BidirectionalIter, class _Predicate>
_BidirectionalIter __partition(_BidirectionalIter __first,
_BidirectionalIter __last,
_Predicate __pred,
bidirectional_iterator_tag)
{
while (true) {
while (true)
if (__first == __last)
return __first;
else if (__pred(*__first))
++__first;
else
break;
--__last;
while (true)
if (__first == __last)
return __first;
else if (!__pred(*__last))
--__last;
else
break;
iter_swap(__first, __last);
++__first;
}
}
template <class _ForwardIter, class _Predicate>
inline _ForwardIter partition(_ForwardIter __first,
_ForwardIter __last,
_Predicate __pred)
{
;
;
return __partition(__first, __last, __pred, __iterator_category(__first));
}
template <class _ForwardIter, class _Predicate, class _Distance>
_ForwardIter __inplace_stable_partition(_ForwardIter __first,
_ForwardIter __last,
_Predicate __pred, _Distance __len)
{
if (__len == 1)
return __pred(*__first) ? __last : __first;
_ForwardIter __middle = __first;
advance(__middle, __len / 2);
return rotate(__inplace_stable_partition(__first, __middle, __pred,
__len / 2),
__middle,
__inplace_stable_partition(__middle, __last, __pred,
__len - __len / 2));
}
template <class _ForwardIter, class _Pointer, class _Predicate,
class _Distance>
_ForwardIter __stable_partition_adaptive(_ForwardIter __first,
_ForwardIter __last,
_Predicate __pred, _Distance __len,
_Pointer __buffer,
_Distance __buffer_size)
{
if (__len <= __buffer_size) {
_ForwardIter __result1 = __first;
_Pointer __result2 = __buffer;
for ( ; __first != __last ; ++__first)
if (__pred(*__first)) {
*__result1 = *__first;
++__result1;
}
else {
*__result2 = *__first;
++__result2;
}
copy(__buffer, __result2, __result1);
return __result1;
}
else {
_ForwardIter __middle = __first;
advance(__middle, __len / 2);
return rotate(__stable_partition_adaptive(
__first, __middle, __pred,
__len / 2, __buffer, __buffer_size),
__middle,
__stable_partition_adaptive(
__middle, __last, __pred,
__len - __len / 2, __buffer, __buffer_size));
}
}
template <class _ForwardIter, class _Predicate, class _Tp, class _Distance>
inline _ForwardIter
__stable_partition_aux(_ForwardIter __first, _ForwardIter __last,
_Predicate __pred, _Tp*, _Distance*)
{
_Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last);
if (__buf.size() > 0)
return __stable_partition_adaptive(__first, __last, __pred,
_Distance(__buf.requested_size()),
__buf.begin(), __buf.size());
else
return __inplace_stable_partition(__first, __last, __pred,
_Distance(__buf.requested_size()));
}
template <class _ForwardIter, class _Predicate>
inline _ForwardIter stable_partition(_ForwardIter __first,
_ForwardIter __last,
_Predicate __pred)
{
;
;
if (__first == __last)
return __first;
else
return __stable_partition_aux(__first, __last, __pred,
__value_type(__first),
__distance_type(__first));
}
template <class _RandomAccessIter, class _Tp>
_RandomAccessIter __unguarded_partition(_RandomAccessIter __first,
_RandomAccessIter __last,
_Tp __pivot)
{
while (true) {
while (*__first < __pivot)
++__first;
--__last;
while (__pivot < *__last)
--__last;
if (!(__first < __last))
return __first;
iter_swap(__first, __last);
++__first;
}
}
template <class _RandomAccessIter, class _Tp, class _Compare>
_RandomAccessIter __unguarded_partition(_RandomAccessIter __first,
_RandomAccessIter __last,
_Tp __pivot, _Compare __comp)
{
while (true) {
while (__comp(*__first, __pivot))
++__first;
--__last;
while (__comp(__pivot, *__last))
--__last;
if (!(__first < __last))
return __first;
iter_swap(__first, __last);
++__first;
}
}
const int __stl_threshold = 16;
template <class _RandomAccessIter, class _Tp>
void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val)
{
_RandomAccessIter __next = __last;
--__next;
while (__val < *__next) {
*__last = *__next;
__last = __next;
--__next;
}
*__last = __val;
}
template <class _RandomAccessIter, class _Tp, class _Compare>
void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val,
_Compare __comp)
{
_RandomAccessIter __next = __last;
--__next;
while (__comp(__val, *__next)) {
*__last = *__next;
__last = __next;
--__next;
}
*__last = __val;
}
template <class _RandomAccessIter, class _Tp>
inline void __linear_insert(_RandomAccessIter __first,
_RandomAccessIter __last, _Tp*)
{
_Tp __val = *__last;
if (__val < *__first) {
copy_backward(__first, __last, __last + 1);
*__first = __val;
}
else
__unguarded_linear_insert(__last, __val);
}
template <class _RandomAccessIter, class _Tp, class _Compare>
inline void __linear_insert(_RandomAccessIter __first,
_RandomAccessIter __last, _Tp*, _Compare __comp)
{
_Tp __val = *__last;
if (__comp(__val, *__first)) {
copy_backward(__first, __last, __last + 1);
*__first = __val;
}
else
__unguarded_linear_insert(__last, __val, __comp);
}
template <class _RandomAccessIter>
void __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
{
if (__first == __last) return;
for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
__linear_insert(__first, __i, __value_type(__first));
}
template <class _RandomAccessIter, class _Compare>
void __insertion_sort(_RandomAccessIter __first,
_RandomAccessIter __last, _Compare __comp)
{
if (__first == __last) return;
for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
__linear_insert(__first, __i, __value_type(__first), __comp);
}
template <class _RandomAccessIter, class _Tp>
void __unguarded_insertion_sort_aux(_RandomAccessIter __first,
_RandomAccessIter __last, _Tp*)
{
for (_RandomAccessIter __i = __first; __i != __last; ++__i)
__unguarded_linear_insert(__i, _Tp(*__i));
}
template <class _RandomAccessIter>
inline void __unguarded_insertion_sort(_RandomAccessIter __first,
_RandomAccessIter __last) {
__unguarded_insertion_sort_aux(__first, __last, __value_type(__first));
}
template <class _RandomAccessIter, class _Tp, class _Compare>
void __unguarded_insertion_sort_aux(_RandomAccessIter __first,
_RandomAccessIter __last,
_Tp*, _Compare __comp)
{
for (_RandomAccessIter __i = __first; __i != __last; ++__i)
__unguarded_linear_insert(__i, _Tp(*__i), __comp);
}
template <class _RandomAccessIter, class _Compare>
inline void __unguarded_insertion_sort(_RandomAccessIter __first,
_RandomAccessIter __last,
_Compare __comp)
{
__unguarded_insertion_sort_aux(__first, __last, __value_type(__first),
__comp);
}
template <class _RandomAccessIter>
void __final_insertion_sort(_RandomAccessIter __first,
_RandomAccessIter __last)
{
if (__last - __first > __stl_threshold) {
__insertion_sort(__first, __first + __stl_threshold);
__unguarded_insertion_sort(__first + __stl_threshold, __last);
}
else
__insertion_sort(__first, __last);
}
template <class _RandomAccessIter, class _Compare>
void __final_insertion_sort(_RandomAccessIter __first,
_RandomAccessIter __last, _Compare __comp)
{
if (__last - __first > __stl_threshold) {
__insertion_sort(__first, __first + __stl_threshold, __comp);
__unguarded_insertion_sort(__first + __stl_threshold, __last, __comp);
}
else
__insertion_sort(__first, __last, __comp);
}
template <class _Size>
inline _Size __lg(_Size __n)
{
_Size __k;
for (__k = 0; __n != 1; __n >>= 1) ++__k;
return __k;
}
template <class _RandomAccessIter, class _Tp, class _Size>
void __introsort_loop(_RandomAccessIter __first,
_RandomAccessIter __last, _Tp*,
_Size __depth_limit)
{
while (__last - __first > __stl_threshold) {
if (__depth_limit == 0) {
partial_sort(__first, __last, __last);
return;
}
--__depth_limit;
_RandomAccessIter __cut =
__unguarded_partition(__first, __last,
_Tp(__median(*__first,
*(__first + (__last - __first)/2),
*(__last - 1))));
__introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit);
__last = __cut;
}
}
template <class _RandomAccessIter, class _Tp, class _Size, class _Compare>
void __introsort_loop(_RandomAccessIter __first,
_RandomAccessIter __last, _Tp*,
_Size __depth_limit, _Compare __comp)
{
while (__last - __first > __stl_threshold) {
if (__depth_limit == 0) {
partial_sort(__first, __last, __last, __comp);
return;
}
--__depth_limit;
_RandomAccessIter __cut =
__unguarded_partition(__first, __last,
_Tp(__median(*__first,
*(__first + (__last - __first)/2),
*(__last - 1), __comp)),
__comp);
__introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp);
__last = __cut;
}
}
template <class _RandomAccessIter>
inline void sort(_RandomAccessIter __first, _RandomAccessIter __last)
{
;
;
if (__first != __last) {
__introsort_loop(__first, __last,
__value_type(__first),
__lg(__last - __first) * 2);
__final_insertion_sort(__first, __last);
}
}
template <class _RandomAccessIter, class _Compare>
inline void sort(_RandomAccessIter __first, _RandomAccessIter __last,
_Compare __comp)
{
;
;
if (__first != __last) {
__introsort_loop(__first, __last,
__value_type(__first),
__lg(__last - __first) * 2,
__comp);
__final_insertion_sort(__first, __last, __comp);
}
}
template <class _RandomAccessIter>
void __inplace_stable_sort(_RandomAccessIter __first,
_RandomAccessIter __last)
{
if (__last - __first < 15) {
__insertion_sort(__first, __last);
return;
}
_RandomAccessIter __middle = __first + (__last - __first) / 2;
__inplace_stable_sort(__first, __middle);
__inplace_stable_sort(__middle, __last);
__merge_without_buffer(__first, __middle, __last,
__middle - __first,
__last - __middle);
}
template <class _RandomAccessIter, class _Compare>
void __inplace_stable_sort(_RandomAccessIter __first,
_RandomAccessIter __last, _Compare __comp)
{
if (__last - __first < 15) {
__insertion_sort(__first, __last, __comp);
return;
}
_RandomAccessIter __middle = __first + (__last - __first) / 2;
__inplace_stable_sort(__first, __middle, __comp);
__inplace_stable_sort(__middle, __last, __comp);
__merge_without_buffer(__first, __middle, __last,
__middle - __first,
__last - __middle,
__comp);
}
template <class _RandomAccessIter1, class _RandomAccessIter2,
class _Distance>
void __merge_sort_loop(_RandomAccessIter1 __first,
_RandomAccessIter1 __last,
_RandomAccessIter2 __result, _Distance __step_size)
{
_Distance __two_step = 2 * __step_size;
while (__last - __first >= __two_step) {
__result = merge(__first, __first + __step_size,
__first + __step_size, __first + __two_step,
__result);
__first += __two_step;
}
__step_size = min(_Distance(__last - __first), __step_size);
merge(__first, __first + __step_size, __first + __step_size, __last,
__result);
}
template <class _RandomAccessIter1, class _RandomAccessIter2,
class _Distance, class _Compare>
void __merge_sort_loop(_RandomAccessIter1 __first,
_RandomAccessIter1 __last,
_RandomAccessIter2 __result, _Distance __step_size,
_Compare __comp)
{
_Distance __two_step = 2 * __step_size;
while (__last - __first >= __two_step) {
__result = merge(__first, __first + __step_size,
__first + __step_size, __first + __two_step,
__result,
__comp);
__first += __two_step;
}
__step_size = min(_Distance(__last - __first), __step_size);
merge(__first, __first + __step_size,
__first + __step_size, __last,
__result,
__comp);
}
const int __stl_chunk_size = 7;
template <class _RandomAccessIter, class _Distance>
void __chunk_insertion_sort(_RandomAccessIter __first,
_RandomAccessIter __last, _Distance __chunk_size)
{
while (__last - __first >= __chunk_size) {
__insertion_sort(__first, __first + __chunk_size);
__first += __chunk_size;
}
__insertion_sort(__first, __last);
}
template <class _RandomAccessIter, class _Distance, class _Compare>
void __chunk_insertion_sort(_RandomAccessIter __first,
_RandomAccessIter __last,
_Distance __chunk_size, _Compare __comp)
{
while (__last - __first >= __chunk_size) {
__insertion_sort(__first, __first + __chunk_size, __comp);
__first += __chunk_size;
}
__insertion_sort(__first, __last, __comp);
}
template <class _RandomAccessIter, class _Pointer, class _Distance>
void __merge_sort_with_buffer(_RandomAccessIter __first,
_RandomAccessIter __last,
_Pointer __buffer, _Distance*)
{
_Distance __len = __last - __first;
_Pointer __buffer_last = __buffer + __len;
_Distance __step_size = __stl_chunk_size;
__chunk_insertion_sort(__first, __last, __step_size);
while (__step_size < __len) {
__merge_sort_loop(__first, __last, __buffer, __step_size);
__step_size *= 2;
__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
__step_size *= 2;
}
}
template <class _RandomAccessIter, class _Pointer, class _Distance,
class _Compare>
void __merge_sort_with_buffer(_RandomAccessIter __first,
_RandomAccessIter __last, _Pointer __buffer,
_Distance*, _Compare __comp)
{
_Distance __len = __last - __first;
_Pointer __buffer_last = __buffer + __len;
_Distance __step_size = __stl_chunk_size;
__chunk_insertion_sort(__first, __last, __step_size, __comp);
while (__step_size < __len) {
__merge_sort_loop(__first, __last, __buffer, __step_size, __comp);
__step_size *= 2;
__merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp);
__step_size *= 2;
}
}
template <class _RandomAccessIter, class _Pointer, class _Distance>
void __stable_sort_adaptive(_RandomAccessIter __first,
_RandomAccessIter __last, _Pointer __buffer,
_Distance __buffer_size)
{
_Distance __len = (__last - __first + 1) / 2;
_RandomAccessIter __middle = __first + __len;
if (__len > __buffer_size) {
__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size);
__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size);
}
else {
__merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0);
__merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0);
}
__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
_Distance(__last - __middle), __buffer, __buffer_size);
}
template <class _RandomAccessIter, class _Pointer, class _Distance,
class _Compare>
void __stable_sort_adaptive(_RandomAccessIter __first,
_RandomAccessIter __last, _Pointer __buffer,
_Distance __buffer_size, _Compare __comp)
{
_Distance __len = (__last - __first + 1) / 2;
_RandomAccessIter __middle = __first + __len;
if (__len > __buffer_size) {
__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size,
__comp);
__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size,
__comp);
}
else {
__merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0,
__comp);
__merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0,
__comp);
}
__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
_Distance(__last - __middle), __buffer, __buffer_size,
__comp);
}
template <class _RandomAccessIter, class _Tp, class _Distance>
inline void __stable_sort_aux(_RandomAccessIter __first,
_RandomAccessIter __last, _Tp*, _Distance*)
{
_Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last);
if (buf.begin() == 0)
__inplace_stable_sort(__first, __last);
else
__stable_sort_adaptive(__first, __last, buf.begin(),
_Distance(buf.size()));
}
template <class _RandomAccessIter, class _Tp, class _Distance, class _Compare>
inline void __stable_sort_aux(_RandomAccessIter __first,
_RandomAccessIter __last, _Tp*, _Distance*,
_Compare __comp)
{
_Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last);
if (buf.begin() == 0)
__inplace_stable_sort(__first, __last, __comp);
else
__stable_sort_adaptive(__first, __last, buf.begin(),
_Distance(buf.size()),
__comp);
}
template <class _RandomAccessIter>
inline void stable_sort(_RandomAccessIter __first,
_RandomAccessIter __last)
{
;
;
__stable_sort_aux(__first, __last,
__value_type(__first),
__distance_type(__first));
}
template <class _RandomAccessIter, class _Compare>
inline void stable_sort(_RandomAccessIter __first,
_RandomAccessIter __last, _Compare __comp)
{
;
;
__stable_sort_aux(__first, __last,
__value_type(__first),
__distance_type(__first),
__comp);
}
template <class _RandomAccessIter, class _Tp>
void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
_RandomAccessIter __last, _Tp*)
{
make_heap(__first, __middle);
for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
if (*__i < *__first)
__pop_heap(__first, __middle, __i, _Tp(*__i),
__distance_type(__first));
sort_heap(__first, __middle);
}
template <class _RandomAccessIter>
inline void partial_sort(_RandomAccessIter __first,
_RandomAccessIter __middle,
_RandomAccessIter __last)
{
;
;
__partial_sort(__first, __middle, __last, __value_type(__first));
}
template <class _RandomAccessIter, class _Tp, class _Compare>
void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
_RandomAccessIter __last, _Tp*, _Compare __comp)
{
make_heap(__first, __middle, __comp);
for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
if (__comp(*__i, *__first))
__pop_heap(__first, __middle, __i, _Tp(*__i), __comp,
__distance_type(__first));
sort_heap(__first, __middle, __comp);
}
template <class _RandomAccessIter, class _Compare>
inline void partial_sort(_RandomAccessIter __first,
_RandomAccessIter __middle,
_RandomAccessIter __last, _Compare __comp)
{
;
;
__partial_sort(__first, __middle, __last, __value_type(__first), __comp);
}
template <class _InputIter, class _RandomAccessIter, class _Distance,
class _Tp>
_RandomAccessIter __partial_sort_copy(_InputIter __first,
_InputIter __last,
_RandomAccessIter __result_first,
_RandomAccessIter __result_last,
_Distance*, _Tp*)
{
if (__result_first == __result_last) return __result_last;
_RandomAccessIter __result_real_last = __result_first;
while(__first != __last && __result_real_last != __result_last) {
*__result_real_last = *__first;
++__result_real_last;
++__first;
}
make_heap(__result_first, __result_real_last);
while (__first != __last) {
if (*__first < *__result_first)
__adjust_heap(__result_first, _Distance(0),
_Distance(__result_real_last - __result_first),
_Tp(*__first));
++__first;
}
sort_heap(__result_first, __result_real_last);
return __result_real_last;
}
template <class _InputIter, class _RandomAccessIter>
inline _RandomAccessIter
partial_sort_copy(_InputIter __first, _InputIter __last,
_RandomAccessIter __result_first,
_RandomAccessIter __result_last)
{
;
;
;
;
return __partial_sort_copy(__first, __last, __result_first, __result_last,
__distance_type(__result_first),
__value_type(__first));
}
template <class _InputIter, class _RandomAccessIter, class _Compare,
class _Distance, class _Tp>
_RandomAccessIter __partial_sort_copy(_InputIter __first,
_InputIter __last,
_RandomAccessIter __result_first,
_RandomAccessIter __result_last,
_Compare __comp, _Distance*, _Tp*)
{
if (__result_first == __result_last) return __result_last;
_RandomAccessIter __result_real_last = __result_first;
while(__first != __last && __result_real_last != __result_last) {
*__result_real_last = *__first;
++__result_real_last;
++__first;
}
make_heap(__result_first, __result_real_last, __comp);
while (__first != __last) {
if (__comp(*__first, *__result_first))
__adjust_heap(__result_first, _Distance(0),
_Distance(__result_real_last - __result_first),
_Tp(*__first),
__comp);
++__first;
}
sort_heap(__result_first, __result_real_last, __comp);
return __result_real_last;
}
template <class _InputIter, class _RandomAccessIter, class _Compare>
inline _RandomAccessIter
partial_sort_copy(_InputIter __first, _InputIter __last,
_RandomAccessIter __result_first,
_RandomAccessIter __result_last, _Compare __comp)
{
;
;
;
;
return __partial_sort_copy(__first, __last, __result_first, __result_last,
__comp,
__distance_type(__result_first),
__value_type(__first));
}
template <class _RandomAccessIter, class _Tp>
void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
_RandomAccessIter __last, _Tp*)
{
while (__last - __first > 3) {
_RandomAccessIter __cut =
__unguarded_partition(__first, __last,
_Tp(__median(*__first,
*(__first + (__last - __first)/2),
*(__last - 1))));
if (__cut <= __nth)
__first = __cut;
else
__last = __cut;
}
__insertion_sort(__first, __last);
}
template <class _RandomAccessIter>
inline void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
_RandomAccessIter __last)
{
;
;
__nth_element(__first, __nth, __last, __value_type(__first));
}
template <class _RandomAccessIter, class _Tp, class _Compare>
void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
_RandomAccessIter __last, _Tp*, _Compare __comp)
{
while (__last - __first > 3) {
_RandomAccessIter __cut =
__unguarded_partition(__first, __last,
_Tp(__median(*__first,
*(__first + (__last - __first)/2),
*(__last - 1),
__comp)),
__comp);
if (__cut <= __nth)
__first = __cut;
else
__last = __cut;
}
__insertion_sort(__first, __last, __comp);
}
template <class _RandomAccessIter, class _Compare>
inline void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
_RandomAccessIter __last, _Compare __comp)
{
;
;
__nth_element(__first, __nth, __last, __value_type(__first), __comp);
}
template <class _ForwardIter, class _Tp, class _Distance>
_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val, _Distance*)
{
_Distance __len = 0;
distance(__first, __last, __len);
_Distance __half;
_ForwardIter __middle;
while (__len > 0) {
__half = __len >> 1;
__middle = __first;
advance(__middle, __half);
if (*__middle < __val) {
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else
__len = __half;
}
return __first;
}
template <class _ForwardIter, class _Tp>
inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val)
{
;
;
;
return __lower_bound(__first, __last, __val,
__distance_type(__first));
}
template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val, _Compare __comp, _Distance*)
{
_Distance __len = 0;
distance(__first, __last, __len);
_Distance __half;
_ForwardIter __middle;
while (__len > 0) {
__half = __len >> 1;
__middle = __first;
advance(__middle, __half);
if (__comp(*__middle, __val)) {
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else
__len = __half;
}
return __first;
}
template <class _ForwardIter, class _Tp, class _Compare>
inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val, _Compare __comp)
{
;
;
;
return __lower_bound(__first, __last, __val, __comp,
__distance_type(__first));
}
template <class _ForwardIter, class _Tp, class _Distance>
_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val, _Distance*)
{
_Distance __len = 0;
distance(__first, __last, __len);
_Distance __half;
_ForwardIter __middle;
while (__len > 0) {
__half = __len >> 1;
__middle = __first;
advance(__middle, __half);
if (__val < *__middle)
__len = __half;
else {
__first = __middle;
++__first;
__len = __len - __half - 1;
}
}
return __first;
}
template <class _ForwardIter, class _Tp>
inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val)
{
;
;
;
return __upper_bound(__first, __last, __val,
__distance_type(__first));
}
template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val, _Compare __comp, _Distance*)
{
_Distance __len = 0;
distance(__first, __last, __len);
_Distance __half;
_ForwardIter __middle;
while (__len > 0) {
__half = __len >> 1;
__middle = __first;
advance(__middle, __half);
if (__comp(__val, *__middle))
__len = __half;
else {
__first = __middle;
++__first;
__len = __len - __half - 1;
}
}
return __first;
}
template <class _ForwardIter, class _Tp, class _Compare>
inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val, _Compare __comp)
{
;
;
;
return __upper_bound(__first, __last, __val, __comp,
__distance_type(__first));
}
template <class _ForwardIter, class _Tp, class _Distance>
pair<_ForwardIter, _ForwardIter>
__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
_Distance*)
{
_Distance __len = 0;
distance(__first, __last, __len);
_Distance __half;
_ForwardIter __middle, __left, __right;
while (__len > 0) {
__half = __len >> 1;
__middle = __first;
advance(__middle, __half);
if (*__middle < __val) {
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else if (__val < *__middle)
__len = __half;
else {
__left = lower_bound(__first, __middle, __val);
advance(__first, __len);
__right = upper_bound(++__middle, __first, __val);
return pair<_ForwardIter, _ForwardIter>(__left, __right);
}
}
return pair<_ForwardIter, _ForwardIter>(__first, __first);
}
template <class _ForwardIter, class _Tp>
inline pair<_ForwardIter, _ForwardIter>
equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val)
{
;
;
;
return __equal_range(__first, __last, __val,
__distance_type(__first));
}
template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
pair<_ForwardIter, _ForwardIter>
__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
_Compare __comp, _Distance*)
{
_Distance __len = 0;
distance(__first, __last, __len);
_Distance __half;
_ForwardIter __middle, __left, __right;
while (__len > 0) {
__half = __len >> 1;
__middle = __first;
advance(__middle, __half);
if (__comp(*__middle, __val)) {
__first = __middle;
++__first;
__len = __len - __half - 1;
}
else if (__comp(__val, *__middle))
__len = __half;
else {
__left = lower_bound(__first, __middle, __val, __comp);
advance(__first, __len);
__right = upper_bound(++__middle, __first, __val, __comp);
return pair<_ForwardIter, _ForwardIter>(__left, __right);
}
}
return pair<_ForwardIter, _ForwardIter>(__first, __first);
}
template <class _ForwardIter, class _Tp, class _Compare>
inline pair<_ForwardIter, _ForwardIter>
equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
_Compare __comp)
{
;
;
;
return __equal_range(__first, __last, __val, __comp,
__distance_type(__first));
}
template <class _ForwardIter, class _Tp>
bool binary_search(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val)
{
;
;
;
_ForwardIter __i = lower_bound(__first, __last, __val);
return __i != __last && !(__val < *__i);
}
template <class _ForwardIter, class _Tp, class _Compare>
bool binary_search(_ForwardIter __first, _ForwardIter __last,
const _Tp& __val,
_Compare __comp)
{
;
;
;
_ForwardIter __i = lower_bound(__first, __last, __val, __comp);
return __i != __last && !__comp(__val, *__i);
}
template <class _InputIter1, class _InputIter2, class _OutputIter>
_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2) {
if (*__first2 < *__first1) {
*__result = *__first2;
++__first2;
}
else {
*__result = *__first1;
++__first1;
}
++__result;
}
return copy(__first2, __last2, copy(__first1, __last1, __result));
}
template <class _InputIter1, class _InputIter2, class _OutputIter,
class _Compare>
_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result, _Compare __comp)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2) {
if (__comp(*__first2, *__first1)) {
*__result = *__first2;
++__first2;
}
else {
*__result = *__first1;
++__first1;
}
++__result;
}
return copy(__first2, __last2, copy(__first1, __last1, __result));
}
template <class _BidirectionalIter, class _Distance>
void __merge_without_buffer(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last,
_Distance __len1, _Distance __len2)
{
if (__len1 == 0 || __len2 == 0)
return;
if (__len1 + __len2 == 2) {
if (*__middle < *__first)
iter_swap(__first, __middle);
return;
}
_BidirectionalIter __first_cut = __first;
_BidirectionalIter __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2) {
__len11 = __len1 / 2;
advance(__first_cut, __len11);
__second_cut = lower_bound(__middle, __last, *__first_cut);
distance(__middle, __second_cut, __len22);
}
else {
__len22 = __len2 / 2;
advance(__second_cut, __len22);
__first_cut = upper_bound(__first, __middle, *__second_cut);
distance(__first, __first_cut, __len11);
}
_BidirectionalIter __new_middle
= rotate(__first_cut, __middle, __second_cut);
__merge_without_buffer(__first, __first_cut, __new_middle,
__len11, __len22);
__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11,
__len2 - __len22);
}
template <class _BidirectionalIter, class _Distance, class _Compare>
void __merge_without_buffer(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last,
_Distance __len1, _Distance __len2,
_Compare __comp)
{
if (__len1 == 0 || __len2 == 0)
return;
if (__len1 + __len2 == 2) {
if (__comp(*__middle, *__first))
iter_swap(__first, __middle);
return;
}
_BidirectionalIter __first_cut = __first;
_BidirectionalIter __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2) {
__len11 = __len1 / 2;
advance(__first_cut, __len11);
__second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
distance(__middle, __second_cut, __len22);
}
else {
__len22 = __len2 / 2;
advance(__second_cut, __len22);
__first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
distance(__first, __first_cut, __len11);
}
_BidirectionalIter __new_middle
= rotate(__first_cut, __middle, __second_cut);
__merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22,
__comp);
__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11,
__len2 - __len22, __comp);
}
template <class _BidirectionalIter1, class _BidirectionalIter2,
class _Distance>
_BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first,
_BidirectionalIter1 __middle,
_BidirectionalIter1 __last,
_Distance __len1, _Distance __len2,
_BidirectionalIter2 __buffer,
_Distance __buffer_size)
{
_BidirectionalIter2 __buffer_end;
if (__len1 > __len2 && __len2 <= __buffer_size) {
__buffer_end = copy(__middle, __last, __buffer);
copy_backward(__first, __middle, __last);
return copy(__buffer, __buffer_end, __first);
}
else if (__len1 <= __buffer_size) {
__buffer_end = copy(__first, __middle, __buffer);
copy(__middle, __last, __first);
return copy_backward(__buffer, __buffer_end, __last);
}
else
return rotate(__first, __middle, __last);
}
template <class _BidirectionalIter1, class _BidirectionalIter2,
class _BidirectionalIter3>
_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
_BidirectionalIter1 __last1,
_BidirectionalIter2 __first2,
_BidirectionalIter2 __last2,
_BidirectionalIter3 __result)
{
if (__first1 == __last1)
return copy_backward(__first2, __last2, __result);
if (__first2 == __last2)
return copy_backward(__first1, __last1, __result);
--__last1;
--__last2;
while (true) {
if (*__last2 < *__last1) {
*--__result = *__last1;
if (__first1 == __last1)
return copy_backward(__first2, ++__last2, __result);
--__last1;
}
else {
*--__result = *__last2;
if (__first2 == __last2)
return copy_backward(__first1, ++__last1, __result);
--__last2;
}
}
}
template <class _BidirectionalIter1, class _BidirectionalIter2,
class _BidirectionalIter3, class _Compare>
_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
_BidirectionalIter1 __last1,
_BidirectionalIter2 __first2,
_BidirectionalIter2 __last2,
_BidirectionalIter3 __result,
_Compare __comp)
{
if (__first1 == __last1)
return copy_backward(__first2, __last2, __result);
if (__first2 == __last2)
return copy_backward(__first1, __last1, __result);
--__last1;
--__last2;
while (true) {
if (__comp(*__last2, *__last1)) {
*--__result = *__last1;
if (__first1 == __last1)
return copy_backward(__first2, ++__last2, __result);
--__last1;
}
else {
*--__result = *__last2;
if (__first2 == __last2)
return copy_backward(__first1, ++__last1, __result);
--__last2;
}
}
}
template <class _BidirectionalIter, class _Distance, class _Pointer>
void __merge_adaptive(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last,
_Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size)
{
if (__len1 <= __len2 && __len1 <= __buffer_size) {
_Pointer __buffer_end = copy(__first, __middle, __buffer);
merge(__buffer, __buffer_end, __middle, __last, __first);
}
else if (__len2 <= __buffer_size) {
_Pointer __buffer_end = copy(__middle, __last, __buffer);
__merge_backward(__first, __middle, __buffer, __buffer_end, __last);
}
else {
_BidirectionalIter __first_cut = __first;
_BidirectionalIter __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2) {
__len11 = __len1 / 2;
advance(__first_cut, __len11);
__second_cut = lower_bound(__middle, __last, *__first_cut);
distance(__middle, __second_cut, __len22);
}
else {
__len22 = __len2 / 2;
advance(__second_cut, __len22);
__first_cut = upper_bound(__first, __middle, *__second_cut);
distance(__first, __first_cut, __len11);
}
_BidirectionalIter __new_middle =
__rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11,
__len22, __buffer, __buffer_size);
__merge_adaptive(__first, __first_cut, __new_middle, __len11,
__len22, __buffer, __buffer_size);
__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
__len2 - __len22, __buffer, __buffer_size);
}
}
template <class _BidirectionalIter, class _Distance, class _Pointer,
class _Compare>
void __merge_adaptive(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last,
_Distance __len1, _Distance __len2,
_Pointer __buffer, _Distance __buffer_size,
_Compare __comp)
{
if (__len1 <= __len2 && __len1 <= __buffer_size) {
_Pointer __buffer_end = copy(__first, __middle, __buffer);
merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
}
else if (__len2 <= __buffer_size) {
_Pointer __buffer_end = copy(__middle, __last, __buffer);
__merge_backward(__first, __middle, __buffer, __buffer_end, __last,
__comp);
}
else {
_BidirectionalIter __first_cut = __first;
_BidirectionalIter __second_cut = __middle;
_Distance __len11 = 0;
_Distance __len22 = 0;
if (__len1 > __len2) {
__len11 = __len1 / 2;
advance(__first_cut, __len11);
__second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
distance(__middle, __second_cut, __len22);
}
else {
__len22 = __len2 / 2;
advance(__second_cut, __len22);
__first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
distance(__first, __first_cut, __len11);
}
_BidirectionalIter __new_middle =
__rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11,
__len22, __buffer, __buffer_size);
__merge_adaptive(__first, __first_cut, __new_middle, __len11,
__len22, __buffer, __buffer_size, __comp);
__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
__len2 - __len22, __buffer, __buffer_size, __comp);
}
}
template <class _BidirectionalIter, class _Tp, class _Distance>
inline void __inplace_merge_aux(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last, _Tp*, _Distance*)
{
_Distance __len1 = 0;
distance(__first, __middle, __len1);
_Distance __len2 = 0;
distance(__middle, __last, __len2);
_Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last);
if (__buf.begin() == 0)
__merge_without_buffer(__first, __middle, __last, __len1, __len2);
else
__merge_adaptive(__first, __middle, __last, __len1, __len2,
__buf.begin(), _Distance(__buf.size()));
}
template <class _BidirectionalIter, class _Tp,
class _Distance, class _Compare>
inline void __inplace_merge_aux(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last, _Tp*, _Distance*,
_Compare __comp)
{
_Distance __len1 = 0;
distance(__first, __middle, __len1);
_Distance __len2 = 0;
distance(__middle, __last, __len2);
_Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last);
if (__buf.begin() == 0)
__merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp);
else
__merge_adaptive(__first, __middle, __last, __len1, __len2,
__buf.begin(), _Distance(__buf.size()),
__comp);
}
template <class _BidirectionalIter>
inline void inplace_merge(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last)
{
;
;
if (__first == __middle || __middle == __last)
return;
__inplace_merge_aux(__first, __middle, __last,
__value_type(__first), __distance_type(__first));
}
template <class _BidirectionalIter, class _Compare>
inline void inplace_merge(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last, _Compare __comp)
{
;
;
if (__first == __middle || __middle == __last)
return;
__inplace_merge_aux(__first, __middle, __last,
__value_type(__first), __distance_type(__first),
__comp);
}
template <class _InputIter1, class _InputIter2>
bool includes(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2)
{
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (*__first2 < *__first1)
return false;
else if(*__first1 < *__first2)
++__first1;
else
++__first1, ++__first2;
return __first2 == __last2;
}
template <class _InputIter1, class _InputIter2, class _Compare>
bool includes(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2, _Compare __comp)
{
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first2, *__first1))
return false;
else if(__comp(*__first1, *__first2))
++__first1;
else
++__first1, ++__first2;
return __first2 == __last2;
}
template <class _InputIter1, class _InputIter2, class _OutputIter>
_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2) {
if (*__first1 < *__first2) {
*__result = *__first1;
++__first1;
}
else if (*__first2 < *__first1) {
*__result = *__first2;
++__first2;
}
else {
*__result = *__first1;
++__first1;
++__first2;
}
++__result;
}
return copy(__first2, __last2, copy(__first1, __last1, __result));
}
template <class _InputIter1, class _InputIter2, class _OutputIter,
class _Compare>
_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result, _Compare __comp)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2) {
if (__comp(*__first1, *__first2)) {
*__result = *__first1;
++__first1;
}
else if (__comp(*__first2, *__first1)) {
*__result = *__first2;
++__first2;
}
else {
*__result = *__first1;
++__first1;
++__first2;
}
++__result;
}
return copy(__first2, __last2, copy(__first1, __last1, __result));
}
template <class _InputIter1, class _InputIter2, class _OutputIter>
_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2)
++__first1;
else if (*__first2 < *__first1)
++__first2;
else {
*__result = *__first1;
++__first1;
++__first2;
++__result;
}
return __result;
}
template <class _InputIter1, class _InputIter2, class _OutputIter,
class _Compare>
_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result, _Compare __comp)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2))
++__first1;
else if (__comp(*__first2, *__first1))
++__first2;
else {
*__result = *__first1;
++__first1;
++__first2;
++__result;
}
return __result;
}
template <class _InputIter1, class _InputIter2, class _OutputIter>
_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2) {
*__result = *__first1;
++__first1;
++__result;
}
else if (*__first2 < *__first1)
++__first2;
else {
++__first1;
++__first2;
}
return copy(__first1, __last1, __result);
}
template <class _InputIter1, class _InputIter2, class _OutputIter,
class _Compare>
_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result, _Compare __comp)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2)) {
*__result = *__first1;
++__first1;
++__result;
}
else if (__comp(*__first2, *__first1))
++__first2;
else {
++__first1;
++__first2;
}
return copy(__first1, __last1, __result);
}
template <class _InputIter1, class _InputIter2, class _OutputIter>
_OutputIter
set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (*__first1 < *__first2) {
*__result = *__first1;
++__first1;
++__result;
}
else if (*__first2 < *__first1) {
*__result = *__first2;
++__first2;
++__result;
}
else {
++__first1;
++__first2;
}
return copy(__first2, __last2, copy(__first1, __last1, __result));
}
template <class _InputIter1, class _InputIter2, class _OutputIter,
class _Compare>
_OutputIter
set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
_InputIter2 __first2, _InputIter2 __last2,
_OutputIter __result,
_Compare __comp)
{
;
;
;
;
;
while (__first1 != __last1 && __first2 != __last2)
if (__comp(*__first1, *__first2)) {
*__result = *__first1;
++__first1;
++__result;
}
else if (__comp(*__first2, *__first1)) {
*__result = *__first2;
++__first2;
++__result;
}
else {
++__first1;
++__first2;
}
return copy(__first2, __last2, copy(__first1, __last1, __result));
}
template <class _ForwardIter>
_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last)
{
;
;
if (__first == __last) return __first;
_ForwardIter __result = __first;
while (++__first != __last)
if (*__result < *__first)
__result = __first;
return __result;
}
template <class _ForwardIter, class _Compare>
_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
_Compare __comp)
{
;
;
if (__first == __last) return __first;
_ForwardIter __result = __first;
while (++__first != __last)
if (__comp(*__result, *__first)) __result = __first;
return __result;
}
template <class _ForwardIter>
_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last)
{
;
;
if (__first == __last) return __first;
_ForwardIter __result = __first;
while (++__first != __last)
if (*__first < *__result)
__result = __first;
return __result;
}
template <class _ForwardIter, class _Compare>
_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
_Compare __comp)
{
;
;
if (__first == __last) return __first;
_ForwardIter __result = __first;
while (++__first != __last)
if (__comp(*__first, *__result))
__result = __first;
return __result;
}
template <class _BidirectionalIter>
bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last)
{
;
;
if (__first == __last)
return false;
_BidirectionalIter __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
for(;;) {
_BidirectionalIter __ii = __i;
--__i;
if (*__i < *__ii) {
_BidirectionalIter __j = __last;
while (!(*__i < *--__j))
{}
iter_swap(__i, __j);
reverse(__ii, __last);
return true;
}
if (__i == __first) {
reverse(__first, __last);
return false;
}
}
}
template <class _BidirectionalIter, class _Compare>
bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
_Compare __comp)
{
;
;
if (__first == __last)
return false;
_BidirectionalIter __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
for(;;) {
_BidirectionalIter __ii = __i;
--__i;
if (__comp(*__i, *__ii)) {
_BidirectionalIter __j = __last;
while (!__comp(*__i, *--__j))
{}
iter_swap(__i, __j);
reverse(__ii, __last);
return true;
}
if (__i == __first) {
reverse(__first, __last);
return false;
}
}
}
template <class _BidirectionalIter>
bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last)
{
;
;
if (__first == __last)
return false;
_BidirectionalIter __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
for(;;) {
_BidirectionalIter __ii = __i;
--__i;
if (*__ii < *__i) {
_BidirectionalIter __j = __last;
while (!(*--__j < *__i))
{}
iter_swap(__i, __j);
reverse(__ii, __last);
return true;
}
if (__i == __first) {
reverse(__first, __last);
return false;
}
}
}
template <class _BidirectionalIter, class _Compare>
bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
_Compare __comp)
{
;
;
if (__first == __last)
return false;
_BidirectionalIter __i = __first;
++__i;
if (__i == __last)
return false;
__i = __last;
--__i;
for(;;) {
_BidirectionalIter __ii = __i;
--__i;
if (__comp(*__ii, *__i)) {
_BidirectionalIter __j = __last;
while (!__comp(*--__j, *__i))
{}
iter_swap(__i, __j);
reverse(__ii, __last);
return true;
}
if (__i == __first) {
reverse(__first, __last);
return false;
}
}
}
template <class _InputIter, class _ForwardIter>
_InputIter find_first_of(_InputIter __first1, _InputIter __last1,
_ForwardIter __first2, _ForwardIter __last2)
{
;
;
;
for ( ; __first1 != __last1; ++__first1)
for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter)
if (*__first1 == *__iter)
return __first1;
return __last1;
}
template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
_InputIter find_first_of(_InputIter __first1, _InputIter __last1,
_ForwardIter __first2, _ForwardIter __last2,
_BinaryPredicate __comp)
{
;
;
;
;
for ( ; __first1 != __last1; ++__first1)
for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter)
if (__comp(*__first1, *__iter))
return __first1;
return __last1;
}
# 3419 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/stl_algo.h" 3
template <class _ForwardIter1, class _ForwardIter2>
_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2,
forward_iterator_tag, forward_iterator_tag)
{
if (__first2 == __last2)
return __last1;
else {
_ForwardIter1 __result = __last1;
while (1) {
_ForwardIter1 __new_result
= search(__first1, __last1, __first2, __last2);
if (__new_result == __last1)
return __result;
else {
__result = __new_result;
__first1 = __new_result;
++__first1;
}
}
}
}
template <class _ForwardIter1, class _ForwardIter2,
class _BinaryPredicate>
_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2,
forward_iterator_tag, forward_iterator_tag,
_BinaryPredicate __comp)
{
if (__first2 == __last2)
return __last1;
else {
_ForwardIter1 __result = __last1;
while (1) {
_ForwardIter1 __new_result
= search(__first1, __last1, __first2, __last2, __comp);
if (__new_result == __last1)
return __result;
else {
__result = __new_result;
__first1 = __new_result;
++__first1;
}
}
}
}
template <class _BidirectionalIter1, class _BidirectionalIter2>
_BidirectionalIter1
__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
_BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
bidirectional_iterator_tag, bidirectional_iterator_tag)
{
;
;
typedef reverse_iterator<_BidirectionalIter1> _RevIter1;
typedef reverse_iterator<_BidirectionalIter2> _RevIter2;
_RevIter1 __rlast1(__first1);
_RevIter2 __rlast2(__first2);
_RevIter1 __rresult = search(_RevIter1(__last1), __rlast1,
_RevIter2(__last2), __rlast2);
if (__rresult == __rlast1)
return __last1;
else {
_BidirectionalIter1 __result = __rresult.base();
advance(__result, -distance(__first2, __last2));
return __result;
}
}
template <class _BidirectionalIter1, class _BidirectionalIter2,
class _BinaryPredicate>
_BidirectionalIter1
__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
_BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
bidirectional_iterator_tag, bidirectional_iterator_tag,
_BinaryPredicate __comp)
{
;
;
typedef reverse_iterator<_BidirectionalIter1> _RevIter1;
typedef reverse_iterator<_BidirectionalIter2> _RevIter2;
_RevIter1 __rlast1(__first1);
_RevIter2 __rlast2(__first2);
_RevIter1 __rresult = search(_RevIter1(__last1), __rlast1,
_RevIter2(__last2), __rlast2,
__comp);
if (__rresult == __rlast1)
return __last1;
else {
_BidirectionalIter1 __result = __rresult.base();
advance(__result, -distance(__first2, __last2));
return __result;
}
}
template <class _ForwardIter1, class _ForwardIter2>
inline _ForwardIter1
find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2)
{
;
;
;
return __find_end(__first1, __last1, __first2, __last2,
__iterator_category(__first1),
__iterator_category(__first2));
}
template <class _ForwardIter1, class _ForwardIter2,
class _BinaryPredicate>
inline _ForwardIter1
find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2,
_BinaryPredicate __comp)
{
;
;
;
return __find_end(__first1, __last1, __first2, __last2,
__iterator_category(__first1),
__iterator_category(__first2),
__comp);
}
template <class _RandomAccessIter, class _Distance>
bool __is_heap(_RandomAccessIter __first, _Distance __n)
{
_Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child) {
if (__first[__parent] < __first[__child])
return false;
if ((__child & 1) == 0)
++__parent;
}
return true;
}
template <class _RandomAccessIter, class _Distance, class _StrictWeakOrdering>
bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp,
_Distance __n)
{
_Distance __parent = 0;
for (_Distance __child = 1; __child < __n; ++__child) {
if (__comp(__first[__parent], __first[__child]))
return false;
if ((__child & 1) == 0)
++__parent;
}
return true;
}
template <class _RandomAccessIter>
inline bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last)
{
;
;
return __is_heap(__first, __last - __first);
}
template <class _RandomAccessIter, class _StrictWeakOrdering>
inline bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
_StrictWeakOrdering __comp)
{
;
;
return __is_heap(__first, __comp, __last - __first);
}
template <class _ForwardIter>
bool is_sorted(_ForwardIter __first, _ForwardIter __last)
{
;
;
if (__first == __last)
return true;
_ForwardIter __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) {
if (*__next < *__first)
return false;
}
return true;
}
template <class _ForwardIter, class _StrictWeakOrdering>
bool is_sorted(_ForwardIter __first, _ForwardIter __last,
_StrictWeakOrdering __comp)
{
;
;
if (__first == __last)
return true;
_ForwardIter __next = __first;
for (++__next; __next != __last; __first = __next, ++__next) {
if (__comp(*__next, *__first))
return false;
}
return true;
}
}
# 66 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/bits/std_algorithm.h" 2 3
# 32 "/afs/fnal.gov/ups/gcc/v3_0_1/Linux+2.2/include/g++-v3/algorithm" 2 3
# 21 "foo.cc" 2
namespace HepPDT {
double spinitod( int js );
int spindtoi( double spin );
int translatePythiatoPDT( const int pythiaID );
int translateIsajettoPDT( const int isajetID );
int translateHerwigtoPDT( const int herwigID);
int translateQQtoPDT( const int qqID);
int translateGeanttoPDT( const int geantID);
int translatePDGtabletoPDT( const int pdgID);
int translateEvtGentoPDT( const int evtGenID );
int translatePDTtoPythia( const int pid );
int translatePDTtoIsajet( const int pid );
int translatePDTtoHerwig( const int pid );
int translatePDTtoQQ( const int pid );
int translatePDTtoGeant( const int pid );
int translatePDTtoPDGtable( const int pid );
int translatePDTtoEvtGen( const int pid );
enum location { nj=1, nq3, nq2, nq1, nl, nr, n, n8, n9, n10 };
struct Quarks {
Quarks( ) : nq1(0), nq2(0), nq3(0) {}
Quarks( short q1, short q2, short q3) : nq1(q1), nq2(q2), nq3(q3) {}
short nq1;
short nq2;
short nq3;
};
class ParticleID {
public:
inline ParticleID( int pid = 0 );
inline ParticleID( const ParticleID & orig );
inline ParticleID& operator=( const ParticleID & );
inline void swap( ParticleID & other );
inline bool operator < ( ParticleID const & other ) const;
inline bool operator == ( ParticleID const & other ) const;
int pid( ) const { return itsPID; }
inline int abspid( ) const;
bool isValid( ) const;
bool isMeson( ) const;
bool isBaryon( ) const;
bool isDiQuark( ) const;
bool isHadron( ) const;
bool isLepton( ) const;
bool isNucleus( ) const;
inline bool hasUp( ) const;
inline bool hasDown( ) const;
inline bool hasStrange( ) const;
inline bool hasCharm( ) const;
inline bool hasBottom( ) const;
inline bool hasTop( ) const;
int jSpin( ) const;
int sSpin( ) const;
int lSpin( ) const;
int fundamentalID( ) const;
int extraBits( ) const;
Quarks quarks( ) const;
int threeCharge( ) const;
int A( ) const;
int Z( ) const;
unsigned short digit(location) const;
private:
int itsPID;
};
inline
void swap( ParticleID & first, ParticleID & second ) { first.swap( second ); }
}
# 141 "foo.cc"
namespace HepPDT {
ParticleID::ParticleID( int pid )
: itsPID ( pid )
{ ; }
ParticleID::ParticleID( const ParticleID & orig )
: itsPID ( orig.itsPID )
{ ; }
ParticleID& ParticleID::operator=( const ParticleID & rhs )
{
ParticleID temp( rhs );
swap( temp );
return *this;
}
void ParticleID::swap( ParticleID & other )
{
std::swap( itsPID, other.itsPID );
}
bool ParticleID::operator < ( ParticleID const & other ) const
{
return itsPID < other.itsPID;
}
bool ParticleID::operator == ( ParticleID const & other ) const
{
return itsPID == other.itsPID;
}
int ParticleID::abspid( ) const
{
return (itsPID < 0) ? -itsPID : itsPID;
}
bool ParticleID::hasUp( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 2 || digit(nq2) == 2 || digit(nq1) == 2 ) { return true; }
return false;
}
bool ParticleID::hasDown( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 1 || digit(nq2) == 1 || digit(nq1) == 1 ) { return true; }
return false;
}
bool ParticleID::hasStrange( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 3 || digit(nq2) == 3 || digit(nq1) == 3 ) { return true; }
return false;
}
bool ParticleID::hasCharm( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 4 || digit(nq2) == 4 || digit(nq1) == 4 ) { return true; }
return false;
}
bool ParticleID::hasBottom( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 5 || digit(nq2) == 5 || digit(nq1) == 5 ) { return true; }
return false;
}
bool ParticleID::hasTop( ) const
{
if( extraBits() > 0 ) { return false; }
if( abspid() <= 100 ) { return false; }
if( fundamentalID() <= 100 && fundamentalID() > 0 ) { return false; }
if( digit(nq3) == 6 || digit(nq2) == 6 || digit(nq1) == 6 ) { return true; }
return false;
}
}
# 242 "foo.cc"
namespace HepPDT {
unsigned short ParticleID::digit( location loc ) const
{
int numerator = (int) std::pow(10.0,(loc-1));
return (abspid()/numerator)%10;
}
}
- - - - - - - - - - - - - cut here - - - - - - - - - - - - - - - - -