carl  24.04
Computer ARithmetic Library
IntegralType

The associated integral type of any type can be defined with IntegralType. More...

Collaboration diagram for IntegralType:

Data Structures

struct  carl::IntegralType< cln::cl_I >
 States that IntegralType of cln::cl_I is cln::cl_I . More...
 
struct  carl::IntegralType< cln::cl_RA >
 States that IntegralType of cln::cl_RA is cln::cl_I . More...
 
struct  carl::IntegralType< mpq_class >
 States that IntegralType of mpq_class is mpz_class . More...
 
struct  carl::IntegralType< mpz_class >
 States that IntegralType of mpz_class is mpz_class . More...
 
struct  carl::IntegralType< float >
 States that IntegralType of float is sint . More...
 
struct  carl::IntegralType< double >
 States that IntegralType of double is sint . More...
 
struct  carl::IntegralType< long double >
 States that IntegralType of long double is sint . More...
 

Detailed Description

The associated integral type of any type can be defined with IntegralType.

Any function that operates on the type and naturally returns an integer, regardless whether the input was actually integral, uses the associated integral type as result type. Simple examples for this are get_num() and get_denom() which return the numerator and denominator respectively of a fraction.


Data Structure Documentation

◆ carl::IntegralType< cln::cl_I >

struct carl::IntegralType< cln::cl_I >

States that IntegralType of cln::cl_I is cln::cl_I .

<>

Definition at line 23 of file typetraits.h.

Inheritance diagram for carl::IntegralType< cln::cl_I >:
Collaboration diagram for carl::IntegralType< cln::cl_I >:

Public Types

using type = cln::cl_I
 A type associated with the type. More...
 

Member Typedef Documentation

◆ type

using carl::has_subtype< cln::cl_I >::type = cln::cl_I
inherited

A type associated with the type.

Definition at line 77 of file typetraits.h.

◆ carl::IntegralType< cln::cl_RA >

struct carl::IntegralType< cln::cl_RA >

States that IntegralType of cln::cl_RA is cln::cl_I .

<>

Definition at line 24 of file typetraits.h.

Inheritance diagram for carl::IntegralType< cln::cl_RA >:
Collaboration diagram for carl::IntegralType< cln::cl_RA >:

Public Types

using type = cln::cl_I
 A type associated with the type. More...
 

Member Typedef Documentation

◆ type

using carl::has_subtype< cln::cl_I >::type = cln::cl_I
inherited

A type associated with the type.

Definition at line 77 of file typetraits.h.

◆ carl::IntegralType< mpq_class >

struct carl::IntegralType< mpq_class >

States that IntegralType of mpq_class is mpz_class .

<>

Definition at line 24 of file typetraits.h.

Inheritance diagram for carl::IntegralType< mpq_class >:
Collaboration diagram for carl::IntegralType< mpq_class >:

Public Types

using type = mpz_class
 A type associated with the type. More...
 

Member Typedef Documentation

◆ type

using carl::has_subtype< mpz_class >::type = mpz_class
inherited

A type associated with the type.

Definition at line 77 of file typetraits.h.

◆ carl::IntegralType< mpz_class >

struct carl::IntegralType< mpz_class >

States that IntegralType of mpz_class is mpz_class .

<>

Definition at line 25 of file typetraits.h.

Inheritance diagram for carl::IntegralType< mpz_class >:
Collaboration diagram for carl::IntegralType< mpz_class >:

Public Types

using type = mpz_class
 A type associated with the type. More...
 

Member Typedef Documentation

◆ type

using carl::has_subtype< mpz_class >::type = mpz_class
inherited

A type associated with the type.

Definition at line 77 of file typetraits.h.

◆ carl::IntegralType< float >

struct carl::IntegralType< float >

States that IntegralType of float is sint .

<>

Definition at line 30 of file typetraits.h.

Inheritance diagram for carl::IntegralType< float >:
Collaboration diagram for carl::IntegralType< float >:

Public Types

using type = sint
 A type associated with the type. More...
 

Member Typedef Documentation

◆ type

using carl::has_subtype< sint >::type = sint
inherited

A type associated with the type.

Definition at line 77 of file typetraits.h.

◆ carl::IntegralType< double >

struct carl::IntegralType< double >

States that IntegralType of double is sint .

<>

Definition at line 31 of file typetraits.h.

Inheritance diagram for carl::IntegralType< double >:
Collaboration diagram for carl::IntegralType< double >:

Public Types

using type = sint
 A type associated with the type. More...
 

Member Typedef Documentation

◆ type

using carl::has_subtype< sint >::type = sint
inherited

A type associated with the type.

Definition at line 77 of file typetraits.h.

◆ carl::IntegralType< long double >

struct carl::IntegralType< long double >

States that IntegralType of long double is sint .

<>

Definition at line 32 of file typetraits.h.

Inheritance diagram for carl::IntegralType< long double >:
Collaboration diagram for carl::IntegralType< long double >:

Public Types

using type = sint
 A type associated with the type. More...
 

Member Typedef Documentation

◆ type

using carl::has_subtype< sint >::type = sint
inherited

A type associated with the type.

Definition at line 77 of file typetraits.h.