![]() |
Home | Libraries | License | Support | People | ALPS Web Site |
alps::half_integer
// In header: <alps/model/half_integer.h> template<typename I> class half_integer { public: // types typedef I integer_type; // member classes/structs/unions struct to_distinguish { }; // construct/copy/destruct half_integer(); template<typename J> half_integer(const half_integer< J > &); template<typename J> half_integer(J, typename boost::enable_if< boost::is_integral< J > >::type * = 0); template<typename J> half_integer(J, typename boost::enable_if< boost::mpl::and_< boost::is_float< J >, boost::mpl::not_< boost::is_same< J, double > > > >::type * = 0); half_integer(double); half_integer(integer_type, const to_distinguish &); // public member functions double to_double() const; integer_type to_integer() const; void set_half(integer_type); integer_type get_twice() const; bool is_odd() const; bool is_even() const; template<typename J> bool operator==(const half_integer< J > &) const; template<typename J> bool operator!=(const half_integer< J > &) const; template<typename J> bool operator<(const half_integer< J > &) const; template<typename J> bool operator>(const half_integer< J > &) const; template<typename J> bool operator<=(const half_integer< J > &) const; template<typename J> bool operator>=(const half_integer< J > &) const; bool operator==(double) const; bool operator!=(double) const; bool operator<(double) const; bool operator>(double) const; bool operator<=(double) const; bool operator>=(double) const; half_integer operator-() const; half_integer & operator++(); half_integer & operator--(); half_integer operator++(int); half_integer operator--(int); template<typename J> half_integer & operator+=(const half_integer< J > &); template<typename J> half_integer & operator-=(const half_integer< J > &); half_integer & operator+=(double); half_integer & operator-=(double); template<typename J> half_integer operator+(const half_integer< J > &) const; template<typename J> half_integer operator-(const half_integer< J > &) const; half_integer operator+(double) const; half_integer operator-(double) const; integer_type distance(const half_integer &) const; half_integer abs() const; // public static functions static half_integer max BOOST_PREVENT_MACRO_SUBSTITUTION(); static half_integer min BOOST_PREVENT_MACRO_SUBSTITUTION(); };
half_integer
public
construct/copy/destructhalf_integer();
template<typename J> half_integer(const half_integer< J > & x);
template<typename J> half_integer(J x, typename boost::enable_if< boost::is_integral< J > >::type * = 0);
template<typename J> half_integer(J x, typename boost::enable_if< boost::mpl::and_< boost::is_float< J >, boost::mpl::not_< boost::is_same< J, double > > > >::type * = 0);
half_integer(double x);
half_integer(integer_type i, const to_distinguish &);
half_integer
public member functionsdouble to_double() const;
integer_type to_integer() const;
void set_half(integer_type x);
integer_type get_twice() const;
bool is_odd() const;
bool is_even() const;
template<typename J> bool operator==(const half_integer< J > & rhs) const;
template<typename J> bool operator!=(const half_integer< J > & rhs) const;
template<typename J> bool operator<(const half_integer< J > & rhs) const;
template<typename J> bool operator>(const half_integer< J > & rhs) const;
template<typename J> bool operator<=(const half_integer< J > & rhs) const;
template<typename J> bool operator>=(const half_integer< J > & rhs) const;
bool operator==(double rhs) const;
bool operator!=(double rhs) const;
bool operator<(double rhs) const;
bool operator>(double rhs) const;
bool operator<=(double rhs) const;
bool operator>=(double rhs) const;
half_integer operator-() const;
half_integer & operator++();
half_integer & operator--();
half_integer operator++(int);
half_integer operator--(int);
template<typename J> half_integer & operator+=(const half_integer< J > & x);
template<typename J> half_integer & operator-=(const half_integer< J > & x);
half_integer & operator+=(double x);
half_integer & operator-=(double x);
template<typename J> half_integer operator+(const half_integer< J > & x) const;
template<typename J> half_integer operator-(const half_integer< J > & x) const;
half_integer operator+(double x) const;
half_integer operator-(double x) const;
integer_type distance(const half_integer & x) const;
half_integer abs() const;
half_integer
public static functionsstatic half_integer max BOOST_PREVENT_MACRO_SUBSTITUTION();
static half_integer min BOOST_PREVENT_MACRO_SUBSTITUTION();
Copyright © 1994, 2002-2005 Matthias Troyer, Synge Todo |