DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// Boost common_factor_ct.hpp header file ----------------------------------// // (C) Copyright Daryle Walker and Stephen Cleary 2001-2002. // Distributed under 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) // See http://www.boost.org for updates, documentation, and revision history. #ifndef BOOST_MATH_COMMON_FACTOR_CT_HPP #define BOOST_MATH_COMMON_FACTOR_CT_HPP #include
// self include #include
// for BOOST_STATIC_CONSTANT, etc. namespace boost { namespace math { // Implementation details --------------------------------------------------// namespace detail { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // Build GCD with Euclid's recursive algorithm template < unsigned long Value1, unsigned long Value2 > struct static_gcd_helper_t { private: BOOST_STATIC_CONSTANT( unsigned long, new_value1 = Value2 ); BOOST_STATIC_CONSTANT( unsigned long, new_value2 = Value1 % Value2 ); #ifndef __BORLANDC__ #define BOOST_DETAIL_GCD_HELPER_VAL(Value) static_cast
(Value) #else typedef static_gcd_helper_t self_type; #define BOOST_DETAIL_GCD_HELPER_VAL(Value) (self_type:: Value ) #endif typedef static_gcd_helper_t< BOOST_DETAIL_GCD_HELPER_VAL(new_value1), BOOST_DETAIL_GCD_HELPER_VAL(new_value2) > next_step_type; #undef BOOST_DETAIL_GCD_HELPER_VAL public: BOOST_STATIC_CONSTANT( unsigned long, value = next_step_type::value ); }; // Non-recursive case template < unsigned long Value1 > struct static_gcd_helper_t< Value1, 0UL > { BOOST_STATIC_CONSTANT( unsigned long, value = Value1 ); }; #else // Use inner class template workaround from Peter Dimov template < unsigned long Value1 > struct static_gcd_helper2_t { template < unsigned long Value2 > struct helper { BOOST_STATIC_CONSTANT( unsigned long, value = static_gcd_helper2_t
::BOOST_NESTED_TEMPLATE helper
::value ); }; template < > struct helper< 0UL > { BOOST_STATIC_CONSTANT( unsigned long, value = Value1 ); }; }; // Special case template < > struct static_gcd_helper2_t< 0UL > { template < unsigned long Value2 > struct helper { BOOST_STATIC_CONSTANT( unsigned long, value = Value2 ); }; }; // Build the GCD from the above template(s) template < unsigned long Value1, unsigned long Value2 > struct static_gcd_helper_t { BOOST_STATIC_CONSTANT( unsigned long, value = static_gcd_helper2_t
::BOOST_NESTED_TEMPLATE helper
::value ); }; #endif #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // Build the LCM from the GCD template < unsigned long Value1, unsigned long Value2 > struct static_lcm_helper_t { typedef static_gcd_helper_t
gcd_type; BOOST_STATIC_CONSTANT( unsigned long, value = Value1 / gcd_type::value * Value2 ); }; // Special case for zero-GCD values template < > struct static_lcm_helper_t< 0UL, 0UL > { BOOST_STATIC_CONSTANT( unsigned long, value = 0UL ); }; #else // Adapt GCD's inner class template workaround for LCM template < unsigned long Value1 > struct static_lcm_helper2_t { template < unsigned long Value2 > struct helper { typedef static_gcd_helper_t
gcd_type; BOOST_STATIC_CONSTANT( unsigned long, value = Value1 / gcd_type::value * Value2 ); }; template < > struct helper< 0UL > { BOOST_STATIC_CONSTANT( unsigned long, value = 0UL ); }; }; // Special case template < > struct static_lcm_helper2_t< 0UL > { template < unsigned long Value2 > struct helper { BOOST_STATIC_CONSTANT( unsigned long, value = 0UL ); }; }; // Build the LCM from the above template(s) template < unsigned long Value1, unsigned long Value2 > struct static_lcm_helper_t { BOOST_STATIC_CONSTANT( unsigned long, value = static_lcm_helper2_t
::BOOST_NESTED_TEMPLATE helper
::value ); }; #endif } // namespace detail // Compile-time greatest common divisor evaluator class declaration --------// template < unsigned long Value1, unsigned long Value2 > struct static_gcd { BOOST_STATIC_CONSTANT( unsigned long, value = (detail::static_gcd_helper_t
::value) ); }; // boost::math::static_gcd // Compile-time least common multiple evaluator class declaration ----------// template < unsigned long Value1, unsigned long Value2 > struct static_lcm { BOOST_STATIC_CONSTANT( unsigned long, value = (detail::static_lcm_helper_t
::value) ); }; // boost::math::static_lcm } // namespace math } // namespace boost #endif // BOOST_MATH_COMMON_FACTOR_CT_HPP
common_factor_ct.hpp
Page URL
File URL
Prev
2/8
Next
Download
( 5 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.