SyTen
half_int.h File Reference

Half-integer implementation. More...

#include <type_traits>
#include <iostream>
#include <sstream>
#include <iomanip>
#include "inc/util/macros.h"
#include "inc/util/boost_versioning.h"
#include "inc/util/thresholds.h"
#include "inc/util/abs_real_imag_conj.h"
#include "inc/util/isnan.h"
#include "inc/util/configuration.h"
#include "inc/util/types.h"
+ Include dependency graph for half_int.h:
+ This graph shows which files directly or indirectly include this file:

Classes

struct  syten::HalfInteger< Base >
 Half-Integers. More...
 
struct  std::hash< syten::HalfInteger< Base > >
 Specialisation for HalfInteger<> More...
 
struct  syten::is_number< HalfInteger< Base > >
 

Namespaces

 std
 STL namespace.
 
 syten
 Syten namespace.
 

Functions

template<>
std::string syten::describe_scalar_type< HalfInteger< std::int16_t > > ()
 Specialisation of describe_scalar_type() for half-integers based on std::int16_ts. More...
 
template<>
std::string syten::describe_scalar_type< HalfInteger< std::int32_t > > ()
 Specialisation of describe_scalar_type() for half-integers based on std::int32_ts. More...
 
template<>
std::string syten::describe_scalar_type< HalfInteger< std::int64_t > > ()
 Specialisation of describe_scalar_type() for half-integers based on std::int64_ts. More...
 
template<typename Base >
bool syten::operator!= (HalfInteger< Base > const a, HalfInteger< typename IdentityType< Base >::type > const b)
 Comparison of two half-integers. More...
 
template<typename Base , typename Other , typename std::enable_if<!std::is_same< HalfInteger< Base >, Other >::value, int >::type = 0>
bool syten::operator!= (HalfInteger< Base > const a, Other const b)
 Comparison of a half-integer with another value. More...
 
template<typename Base >
HalfInteger< Base > syten::operator% (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Modulo of two half-integers. More...
 
template<typename Base >
HalfInteger< Base > syten::operator% (HalfInteger< Base > const a, int const b)
 Modulo of two half-integers. More...
 
template<typename Base >
HalfInteger< Base > syten::operator* (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Product of two half-integers. More...
 
template<typename Base , typename Other , typename std::enable_if<!std::is_same< HalfInteger< Base >, Other >::value, int >::type = 0>
HalfInteger< Base > syten::operator* (HalfInteger< Base > const a, Other const b)
 Product of a half-integer and another value. More...
 
template<typename Base , typename Other >
HalfInteger< Base > syten::operator* (Other const b, HalfInteger< Base > const a)
 Product of a half-integer and another value. More...
 
template<typename Base >
HalfInteger< Base > syten::operator+ (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Sum of two half-integers. More...
 
template<typename Base , typename Other , typename std::enable_if<!std::is_same< HalfInteger< Base >, Other >::value, int >::type = 0>
HalfInteger< Base > syten::operator+ (HalfInteger< Base > const a, Other const b)
 Sum of a half-integer and another scalar. More...
 
template<typename Base >
HalfInteger< Base > syten::operator- (HalfInteger< Base > const a)
 Negative of a half-integer. More...
 
template<typename Base >
HalfInteger< Base > syten::operator- (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Difference between two half-integers. More...
 
template<typename Base , typename Other >
HalfInteger< Base > syten::operator/ (HalfInteger< Base > const a, Other const b)
 Division of a half-integer by another value. More...
 
template<typename Base >
bool syten::operator< (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Less-than comparison for HalfInteger. More...
 
template<typename Base >
std::ostreamsyten::operator<< (std::ostream &o, HalfInteger< Base > const b)
 Output for half-integers. More...
 
template<typename Base >
bool syten::operator<= (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Less-or-equal comparison for HalfInteger. More...
 
template<typename Base >
bool syten::operator== (HalfInteger< Base > const a, HalfInteger< typename IdentityType< Base >::type > const b)
 Comparison of two half-integers. More...
 
template<typename Base , typename Other , typename std::enable_if<!std::is_same< HalfInteger< Base >, Other >::value, int >::type = 0>
bool syten::operator== (HalfInteger< Base > const a, Other const b)
 Comparison of a half-integer with another value. More...
 
template<typename Base >
bool syten::operator> (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Greater-than comparison for HalfInteger. More...
 
template<typename Base >
bool syten::operator>= (HalfInteger< Base > const a, HalfInteger< Base > const b)
 Greater-or-equal comparison for HalfInteger. More...
 
template<typename Base >
std::istreamsyten::operator>> (std::istream &i, HalfInteger< Base > &b)
 Input behaves like a SYTEN_SRDEF_TYPE, then do the conversion. More...
 

Detailed Description

Half-integer implementation.