/usr/include/boost/polygon
NameSizeModeActions
detail/-0755rm
gmp_override.hpp32450644editdlrm
gtl.hpp6960644editdlrm
interval_concept.hpp259930644editdlrm
interval_data.hpp27010644editdlrm
interval_traits.hpp13640644editdlrm
isotropy.hpp175710644editdlrm
point_concept.hpp127430644editdlrm
point_data.hpp32520644editdlrm
point_traits.hpp13280644editdlrm
polygon.hpp24180644editdlrm
polygon_45_data.hpp23300644editdlrm
polygon_45_set_concept.hpp193930644editdlrm
polygon_45_set_data.hpp783300644editdlrm
polygon_45_set_traits.hpp62160644editdlrm
polygon_45_with_holes_data.hpp35100644editdlrm
polygon_90_data.hpp28880644editdlrm
polygon_90_set_concept.hpp269230644editdlrm
polygon_90_set_data.hpp445010644editdlrm
polygon_90_set_traits.hpp164510644editdlrm
polygon_90_with_holes_data.hpp39940644editdlrm
polygon_data.hpp22180644editdlrm
polygon_set_concept.hpp265700644editdlrm
polygon_set_data.hpp402510644editdlrm
polygon_set_traits.hpp53850644editdlrm
polygon_traits.hpp741800644editdlrm
polygon_with_holes_data.hpp34580644editdlrm
rectangle_concept.hpp508980644editdlrm
rectangle_data.hpp21200644editdlrm
rectangle_traits.hpp13490644editdlrm
segment_concept.hpp200860644editdlrm
segment_data.hpp27720644editdlrm
segment_traits.hpp14630644editdlrm
segment_utils.hpp49630644editdlrm
transform.hpp150040644editdlrm
voronoi.hpp45110644editdlrm
voronoi_builder.hpp196720644editdlrm
voronoi_diagram.hpp194890644editdlrm
voronoi_geometry_type.hpp14070644editdlrm
Edit: /usr/include/boost/polygon/gmp_override.hpp (3245B)
/* Copyright 2008 Intel Corporation Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). */ #ifndef BOOST_POLYGON_GMP_OVERRIDE_HPP #define BOOST_POLYGON_GMP_OVERRIDE_HPP #include namespace boost { namespace polygon { class gmp_int { private: inline gmp_int(const mpq_class& input) : v_(input) {} public: inline gmp_int() {} explicit inline gmp_int(long input) : v_(input) {} inline gmp_int(const gmp_int& input) : v_(input.v_) {} inline gmp_int& operator=(const gmp_int& that) { v_ = that.v_; return (*this); } inline gmp_int& operator=(long that) { v_ = that; return (*this); } inline operator int() const { std::cout << "cast\n"; mpz_class num = v_.get_num(); mpz_class den = v_.get_den(); num /= den; return num.get_si(); } inline double get_d() const { return v_.get_d(); } inline int get_num() const { return v_.get_num().get_si(); } inline int get_den() const { return v_.get_den().get_si(); } inline bool operator==(const gmp_int& that) const { return v_ == that.v_; } inline bool operator!=(const gmp_int& that) const { return v_ != that.v_; } inline bool operator<(const gmp_int& that) const { bool retval = v_ < that.v_; return retval; } inline bool operator<=(const gmp_int& that) const { return v_ <= that.v_; } inline bool operator>(const gmp_int& that) const { return v_ > that.v_; } inline bool operator>=(const gmp_int& that) const { return v_ >= that.v_; } inline gmp_int operator+(const gmp_int& b) { return gmp_int((*this).v_ + b.v_); } inline gmp_int operator-(const gmp_int& b) { return gmp_int((*this).v_ - b.v_); } inline gmp_int operator*(const gmp_int& b) { return gmp_int((*this).v_ * b.v_); } inline gmp_int operator/(const gmp_int& b) { return gmp_int((*this).v_ / b.v_); } inline gmp_int& operator+=(const gmp_int& b) { (*this).v_ += b.v_; return (*this); } inline gmp_int& operator-=(const gmp_int& b) { (*this).v_ -= b.v_; return (*this); } inline gmp_int& operator*=(const gmp_int& b) { (*this).v_ *= b.v_; return (*this); } inline gmp_int& operator/=(const gmp_int& b) { (*this).v_ /= b.v_; return (*this); } inline gmp_int& operator++() { ++v_; return (*this); } inline gmp_int& operator--() { --v_; return (*this); } inline gmp_int operator++(int) { gmp_int retval(*this); ++(*this); return retval; } inline gmp_int operator--(int) { gmp_int retval(*this); --(*this); return retval; } private: mpq_class v_; }; template <> struct high_precision_type { typedef mpq_class type; }; template <> int convert_high_precision_type(const mpq_class& v) { mpz_class num = v.get_num(); mpz_class den = v.get_den(); num /= den; return num.get_si(); }; } } #endif