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 65 of file Teuchos_BigUIntDecl.hpp.

Constructor & Destructor Documentation

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

Definition at line 55 of file Teuchos_BigUInt.hpp.

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

Definition at line 58 of file Teuchos_BigUInt.hpp.

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

Definition at line 65 of file Teuchos_BigUInt.hpp.

Member Function Documentation

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

Definition at line 73 of file Teuchos_BigUInt.hpp.

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

Definition at line 79 of file Teuchos_BigUInt.hpp.

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

Definition at line 82 of file Teuchos_BigUInt.hpp.

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

Definition at line 85 of file Teuchos_BigUInt.hpp.

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

Definition at line 97 of file Teuchos_BigUInt.hpp.

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

Definition at line 110 of file Teuchos_BigUInt.hpp.

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

Definition at line 127 of file Teuchos_BigUInt.hpp.

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

Definition at line 145 of file Teuchos_BigUInt.hpp.

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

Definition at line 157 of file Teuchos_BigUInt.hpp.

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

Definition at line 175 of file Teuchos_BigUInt.hpp.

Member Data Documentation

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

Definition at line 67 of file Teuchos_BigUIntDecl.hpp.


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