Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
Teuchos::BigUInt< n > Class Template Reference

Arbitrary-precision unsigned integer class. More...

#include <Teuchos_BigUIntDecl.hpp>

Public Member Functions

 BigUInt ()
 
 BigUInt (std::uint64_t v)
 
 BigUInt (std::string const &s)
 
 operator bool () const noexcept
 
std::uint32_t & operator[] (int i)
 
std::uint32_t const & operator[] (int i) const
 
BigUIntoperator+= (std::uint32_t b)
 
BigUIntoperator+= (BigUInt const &b)
 
BigUIntoperator-= (std::uint32_t b)
 
BigUIntoperator-= (BigUInt const &b)
 
BigUIntoperator*= (std::uint32_t b)
 
BigUIntoperator<<= (std::uint32_t b)
 
BigUIntoperator>>= (std::uint32_t b)
 

Private Attributes

std::uint32_t x [n]
 

Detailed Description

template<int n>
class Teuchos::BigUInt< n >

Arbitrary-precision unsigned integer class.

This class implements an unsigned integer type of arbitrary precision. The precision is chosen at compile time via a template parameter. The template parameter specifies how many 32-bit "digits" will compose the full integer. Thus, the number has (32*n) bits of precision.

This class was primarily created to serve the Teuchos::print_double function for printing floating-point values in a lossless and minimal way.

Definition at line 34 of file Teuchos_BigUIntDecl.hpp.

Constructor & Destructor Documentation

template<int n>
Teuchos::BigUInt< n >::BigUInt ( )

Definition at line 23 of file Teuchos_BigUInt.hpp.

template<int n>
Teuchos::BigUInt< n >::BigUInt ( std::uint64_t  v)

Definition at line 26 of file Teuchos_BigUInt.hpp.

template<int n>
Teuchos::BigUInt< n >::BigUInt ( std::string const &  s)

Definition at line 33 of file Teuchos_BigUInt.hpp.

Member Function Documentation

template<int n>
Teuchos::BigUInt< n >::operator bool ( ) const
explicitnoexcept

Definition at line 41 of file Teuchos_BigUInt.hpp.

template<int n>
std::uint32_t & Teuchos::BigUInt< n >::operator[] ( int  i)

Definition at line 47 of file Teuchos_BigUInt.hpp.

template<int n>
std::uint32_t const & Teuchos::BigUInt< n >::operator[] ( int  i) const

Definition at line 50 of file Teuchos_BigUInt.hpp.

template<int n>
BigUInt< n > & Teuchos::BigUInt< n >::operator+= ( std::uint32_t  b)

Definition at line 53 of file Teuchos_BigUInt.hpp.

template<int n>
BigUInt< n > & Teuchos::BigUInt< n >::operator+= ( BigUInt< n > const &  b)

Definition at line 65 of file Teuchos_BigUInt.hpp.

template<int n>
BigUInt< n > & Teuchos::BigUInt< n >::operator-= ( std::uint32_t  b)

Definition at line 78 of file Teuchos_BigUInt.hpp.

template<int n>
BigUInt< n > & Teuchos::BigUInt< n >::operator-= ( BigUInt< n > const &  b)

Definition at line 95 of file Teuchos_BigUInt.hpp.

template<int n>
BigUInt< n > & Teuchos::BigUInt< n >::operator*= ( std::uint32_t  b)

Definition at line 113 of file Teuchos_BigUInt.hpp.

template<int n>
BigUInt< n > & Teuchos::BigUInt< n >::operator<<= ( std::uint32_t  b)

Definition at line 125 of file Teuchos_BigUInt.hpp.

template<int n>
BigUInt< n > & Teuchos::BigUInt< n >::operator>>= ( std::uint32_t  b)

Definition at line 143 of file Teuchos_BigUInt.hpp.

Member Data Documentation

template<int n>
std::uint32_t Teuchos::BigUInt< n >::x[n]
private

Definition at line 36 of file Teuchos_BigUIntDecl.hpp.


The documentation for this class was generated from the following files: