Aerobus v1.2
Loading...
Searching...
No Matches
Classes | Public Types | Static Public Attributes | List of all members
aerobus::i32 Struct Reference

32 bits signed integers, seen as a algebraic ring with related operations More...

#include <aerobus.h>

Classes

struct  val
 values in i32, again represented as types More...
 

Public Types

using inner_type = int32_t
 
using zero = val< 0 >
 constant zero
 
using one = val< 1 >
 constant one
 
template<auto x>
using inject_constant_t = val< static_cast< int32_t >(x)>
 inject a native constant
 
template<typename v >
using inject_ring_t = v
 
template<typename v1 , typename v2 >
using add_t = typename add< v1, v2 >::type
 addition operator yields v1 + v2
 
template<typename v1 , typename v2 >
using sub_t = typename sub< v1, v2 >::type
 substraction operator yields v1 - v2
 
template<typename v1 , typename v2 >
using mul_t = typename mul< v1, v2 >::type
 multiplication operator yields v1 * v2
 
template<typename v1 , typename v2 >
using div_t = typename div< v1, v2 >::type
 division operator yields v1 / v2
 
template<typename v1 , typename v2 >
using mod_t = typename remainder< v1, v2 >::type
 modulus operator yields v1 % v2
 
template<typename v1 , typename v2 >
using gt_t = typename gt< v1, v2 >::type
 strictly greater operator (v1 > v2) yields v1 > v2
 
template<typename v1 , typename v2 >
using lt_t = typename lt< v1, v2 >::type
 strict less operator (v1 < v2) yields v1 < v2
 
template<typename v1 , typename v2 >
using eq_t = typename eq< v1, v2 >::type
 equality operator (type) yields v1 == v2 as std::integral_constant<bool>
 
template<typename v1 , typename v2 >
using gcd_t = gcd_t< i32, v1, v2 >
 greatest common divisor yields GCD(v1, v2)
 
template<typename v >
using pos_t = typename pos< v >::type
 positivity operator yields v > 0 as std::true_type or std::false_type
 

Static Public Attributes

static constexpr bool is_field = false
 integers are not a field
 
static constexpr bool is_euclidean_domain = true
 integers are an euclidean domain
 
template<typename v1 , typename v2 >
static constexpr bool eq_v = eq_t<v1, v2>::value
 equality operator (boolean value)
 
template<typename v >
static constexpr bool pos_v = pos_t<v>::value
 positivity (boolean value) yields v > 0 as boolean value
 

Detailed Description

32 bits signed integers, seen as a algebraic ring with related operations

Examples
examples/compensated_horner.cpp.

Member Typedef Documentation

◆ add_t

template<typename v1 , typename v2 >
using aerobus::i32::add_t = typename add<v1, v2>::type

addition operator yields v1 + v2

Template Parameters
v1a value in i32
v2a value in i32

◆ div_t

template<typename v1 , typename v2 >
using aerobus::i32::div_t = typename div<v1, v2>::type

division operator yields v1 / v2

Template Parameters
v1a value in i32
v2a value in i32

◆ eq_t

template<typename v1 , typename v2 >
using aerobus::i32::eq_t = typename eq<v1, v2>::type

equality operator (type) yields v1 == v2 as std::integral_constant<bool>

Template Parameters
v1a value in i32
v2a value in i32

◆ gcd_t

template<typename v1 , typename v2 >
using aerobus::i32::gcd_t = gcd_t<i32, v1, v2>

greatest common divisor yields GCD(v1, v2)

Template Parameters
v1a value in i32
v2a value in i32

◆ gt_t

template<typename v1 , typename v2 >
using aerobus::i32::gt_t = typename gt<v1, v2>::type

strictly greater operator (v1 > v2) yields v1 > v2

Template Parameters
v1a value in i32
v2a value in i32

◆ inject_constant_t

template<auto x>
using aerobus::i32::inject_constant_t = val<static_cast<int32_t>(x)>

inject a native constant

Template Parameters
x

◆ inject_ring_t

template<typename v >
using aerobus::i32::inject_ring_t = v

◆ inner_type

using aerobus::i32::inner_type = int32_t

◆ lt_t

template<typename v1 , typename v2 >
using aerobus::i32::lt_t = typename lt<v1, v2>::type

strict less operator (v1 < v2) yields v1 < v2

Template Parameters
v1a value in i32
v2a value in i32

◆ mod_t

template<typename v1 , typename v2 >
using aerobus::i32::mod_t = typename remainder<v1, v2>::type

modulus operator yields v1 % v2

Template Parameters
v1a value in i32
v2a value in i32

◆ mul_t

template<typename v1 , typename v2 >
using aerobus::i32::mul_t = typename mul<v1, v2>::type

multiplication operator yields v1 * v2

Template Parameters
v1a value in i32
v2a value in i32

◆ one

using aerobus::i32::one = val<1>

constant one

◆ pos_t

template<typename v >
using aerobus::i32::pos_t = typename pos<v>::type

positivity operator yields v > 0 as std::true_type or std::false_type

Template Parameters
va value in i32

◆ sub_t

template<typename v1 , typename v2 >
using aerobus::i32::sub_t = typename sub<v1, v2>::type

substraction operator yields v1 - v2

Template Parameters
v1a value in i32
v2a value in i32

◆ zero

using aerobus::i32::zero = val<0>

constant zero

Member Data Documentation

◆ eq_v

template<typename v1 , typename v2 >
constexpr bool aerobus::i32::eq_v = eq_t<v1, v2>::value
staticconstexpr

equality operator (boolean value)

Template Parameters
v1
v2

◆ is_euclidean_domain

constexpr bool aerobus::i32::is_euclidean_domain = true
staticconstexpr

integers are an euclidean domain

◆ is_field

constexpr bool aerobus::i32::is_field = false
staticconstexpr

integers are not a field

◆ pos_v

template<typename v >
constexpr bool aerobus::i32::pos_v = pos_t<v>::value
staticconstexpr

positivity (boolean value) yields v > 0 as boolean value

Template Parameters
va value in i32

The documentation for this struct was generated from the following file: