GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave_int< T > Class Template Reference

#include "oct-inttypes.h"

Inheritance diagram for octave_int< T >:
octave_int_base< T >

Public Types

typedef T val_type
 

Public Member Functions

 octave_int ()
 
 octave_int (bool b)
 
 octave_int (const octave_int< T > &)=default
 
template<typename U >
 octave_int (const octave_int< U > &i)
 
template<typename U >
 octave_int (const U &i)
 
 octave_int (double d)
 
 octave_int (float d)
 
 octave_int (T i)
 
 ~octave_int ()=default
 
octave_int< T > abs () const
 
bool bool_value () const
 
char char_value () const
 
double double_value () const
 
float float_value () const
 
const unsigned char * iptr () const
 
 operator T () const
 
bool operator! () const
 
octave_int< T > operator% (const octave_int< T > &y) const
 
octave_int< T > & operator%= (const octave_int< T > &y)
 
octave_int< T > operator* (const octave_int< T > &y) const
 
octave_int< T > & operator*= (const octave_int< T > &y)
 
octave_int< T > operator+ () const
 
octave_int< T > operator+ (const octave_int< T > &y) const
 
octave_int< T > & operator+= (const octave_int< T > &y)
 
octave_int< T > operator- () const
 
octave_int< T > operator- (const octave_int< T > &y) const
 
octave_int< T > & operator-= (const octave_int< T > &y)
 
octave_int< T > operator/ (const octave_int< T > &y) const
 
octave_int< T > & operator/= (const octave_int< T > &y)
 
octave_int< T > operator<< (const int &y) const
 
octave_int< T > & operator<<= (const int &y)
 
octave_intoperator= (const octave_int< T > &)=default
 
octave_int< T > operator>> (const int &y) const
 
octave_int< T > & operator>>= (const int &y)
 
octave_int< T > operator~ () const
 
octave_int< T > signum () const
 
const char * type_name ()
 
const char * type_name ()
 
const char * type_name ()
 
const char * type_name ()
 
const char * type_name ()
 
const char * type_name ()
 
const char * type_name ()
 
const char * type_name ()
 
value () const
 

Static Public Member Functions

static int byte_size ()
 
static octave_int< T > max ()
 
static octave_int< T > min ()
 
static int nbits ()
 
static const char * type_name ()
 
- Static Public Member Functions inherited from octave_int_base< T >
template<typename S >
static T convert_real (const S &value)
 
static T max_val ()
 
static T min_val ()
 
template<typename S >
static T truncate_int (const S &value)
 

Static Public Attributes

static const octave_int s_one
 
static const octave_int s_zero
 

Detailed Description

template<typename T>
class octave_int< T >

Definition at line 782 of file oct-inttypes.h.

Member Typedef Documentation

◆ val_type

template<typename T >
typedef T octave_int< T >::val_type

Definition at line 788 of file oct-inttypes.h.

Constructor & Destructor Documentation

◆ octave_int() [1/8]

template<typename T >
octave_int< T >::octave_int ( )
inline

Definition at line 790 of file oct-inttypes.h.

◆ octave_int() [2/8]

template<typename T >
octave_int< T >::octave_int ( i)
inline

Definition at line 792 of file oct-inttypes.h.

◆ octave_int() [3/8]

template<typename T >
octave_int< T >::octave_int ( double  d)
inline

Definition at line 803 of file oct-inttypes.h.

◆ octave_int() [4/8]

template<typename T >
octave_int< T >::octave_int ( float  d)
inline

Definition at line 806 of file oct-inttypes.h.

◆ octave_int() [5/8]

template<typename T >
octave_int< T >::octave_int ( bool  b)
inline

Definition at line 816 of file oct-inttypes.h.

◆ octave_int() [6/8]

template<typename T >
template<typename U >
octave_int< T >::octave_int ( const U &  i)
inline

Definition at line 819 of file oct-inttypes.h.

◆ octave_int() [7/8]

template<typename T >
template<typename U >
octave_int< T >::octave_int ( const octave_int< U > &  i)
inline

Definition at line 823 of file oct-inttypes.h.

◆ octave_int() [8/8]

template<typename T >
octave_int< T >::octave_int ( const octave_int< T > &  )
default

◆ ~octave_int()

template<typename T >
octave_int< T >::~octave_int ( )
default

Member Function Documentation

◆ abs()

template<typename T >
octave_int<T> octave_int< T >::abs ( ) const
inline

Definition at line 862 of file oct-inttypes.h.

◆ bool_value()

template<typename T >
bool octave_int< T >::bool_value ( ) const
inline

Definition at line 841 of file oct-inttypes.h.

Referenced by operator-().

◆ byte_size()

template<typename T >
static int octave_int< T >::byte_size ( )
inlinestatic

Definition at line 903 of file oct-inttypes.h.

◆ char_value()

template<typename T >
char octave_int< T >::char_value ( ) const
inline

Definition at line 843 of file oct-inttypes.h.

◆ double_value()

template<typename T >
double octave_int< T >::double_value ( ) const
inline

Definition at line 845 of file oct-inttypes.h.

Referenced by op_dble_prod(), op_dble_sum(), pow(), and powf().

◆ float_value()

template<typename T >
float octave_int< T >::float_value ( ) const
inline

Definition at line 847 of file oct-inttypes.h.

Referenced by pow(), and powf().

◆ iptr()

template<typename T >
const unsigned char* octave_int< T >::iptr ( ) const
inline

Definition at line 834 of file oct-inttypes.h.

◆ max()

template<typename T >
static octave_int<T> octave_int< T >::max ( )
inlinestatic

Definition at line 899 of file oct-inttypes.h.

References max().

Referenced by operator*(), operator+(), operator-(), and operator/().

◆ min()

template<typename T >
static octave_int<T> octave_int< T >::min ( )
inlinestatic

Definition at line 898 of file oct-inttypes.h.

References min().

◆ nbits()

template<typename T >
static int octave_int< T >::nbits ( )
inlinestatic

Definition at line 901 of file oct-inttypes.h.

◆ operator T()

template<typename T >
octave_int< T >::operator T ( ) const
inline

Definition at line 849 of file oct-inttypes.h.

◆ operator!()

template<typename T >
bool octave_int< T >::operator! ( ) const
inline

Definition at line 839 of file oct-inttypes.h.

◆ operator%()

template<typename T >
octave_int<T> octave_int< T >::operator% ( const octave_int< T > &  y) const
inline

Definition at line 892 of file oct-inttypes.h.

◆ operator%=()

template<typename T >
octave_int<T>& octave_int< T >::operator%= ( const octave_int< T > &  y)
inline

Definition at line 892 of file oct-inttypes.h.

◆ operator*()

template<typename T >
octave_int<T> octave_int< T >::operator* ( const octave_int< T > &  y) const
inline

Definition at line 890 of file oct-inttypes.h.

◆ operator*=()

template<typename T >
octave_int<T>& octave_int< T >::operator*= ( const octave_int< T > &  y)
inline

Definition at line 890 of file oct-inttypes.h.

◆ operator+() [1/2]

template<typename T >
octave_int<T> octave_int< T >::operator+ ( ) const
inline

Definition at line 851 of file oct-inttypes.h.

◆ operator+() [2/2]

template<typename T >
octave_int<T> octave_int< T >::operator+ ( const octave_int< T > &  y) const
inline

Definition at line 888 of file oct-inttypes.h.

◆ operator+=()

template<typename T >
octave_int<T>& octave_int< T >::operator+= ( const octave_int< T > &  y)
inline

Definition at line 888 of file oct-inttypes.h.

◆ operator-() [1/2]

template<typename T >
octave_int<T> octave_int< T >::operator- ( ) const
inline

Definition at line 861 of file oct-inttypes.h.

◆ operator-() [2/2]

template<typename T >
octave_int<T> octave_int< T >::operator- ( const octave_int< T > &  y) const
inline

Definition at line 889 of file oct-inttypes.h.

◆ operator-=()

template<typename T >
octave_int<T>& octave_int< T >::operator-= ( const octave_int< T > &  y)
inline

Definition at line 889 of file oct-inttypes.h.

◆ operator/()

template<typename T >
octave_int<T> octave_int< T >::operator/ ( const octave_int< T > &  y) const
inline

Definition at line 891 of file oct-inttypes.h.

◆ operator/=()

template<typename T >
octave_int<T>& octave_int< T >::operator/= ( const octave_int< T > &  y)
inline

Definition at line 891 of file oct-inttypes.h.

◆ operator<<()

template<typename T >
octave_int<T> octave_int< T >::operator<< ( const int &  y) const
inline

Definition at line 892 of file oct-inttypes.h.

◆ operator<<=()

template<typename T >
octave_int<T>& octave_int< T >::operator<<= ( const int &  y)
inline

Definition at line 892 of file oct-inttypes.h.

◆ operator=()

template<typename T >
octave_int& octave_int< T >::operator= ( const octave_int< T > &  )
default

◆ operator>>()

template<typename T >
octave_int<T> octave_int< T >::operator>> ( const int &  y) const
inline

Definition at line 894 of file oct-inttypes.h.

◆ operator>>=()

template<typename T >
octave_int<T>& octave_int< T >::operator>>= ( const int &  y)
inline

Definition at line 894 of file oct-inttypes.h.

◆ operator~()

template<typename T >
octave_int<T> octave_int< T >::operator~ ( ) const
inline

Definition at line 867 of file oct-inttypes.h.

◆ signum()

template<typename T >
octave_int<T> octave_int< T >::signum ( ) const
inline

Definition at line 863 of file oct-inttypes.h.

◆ type_name() [1/9]

const char * octave_int< int8_t >::type_name ( )

Definition at line 47 of file oct-inttypes.cc.

◆ type_name() [2/9]

const char * octave_int< int16_t >::type_name ( )

Definition at line 48 of file oct-inttypes.cc.

◆ type_name() [3/9]

const char * octave_int< int32_t >::type_name ( )

Definition at line 49 of file oct-inttypes.cc.

◆ type_name() [4/9]

const char * octave_int< int64_t >::type_name ( )

Definition at line 50 of file oct-inttypes.cc.

◆ type_name() [5/9]

const char * octave_int< uint8_t >::type_name ( )

Definition at line 51 of file oct-inttypes.cc.

◆ type_name() [6/9]

const char * octave_int< uint16_t >::type_name ( )

Definition at line 52 of file oct-inttypes.cc.

◆ type_name() [7/9]

const char * octave_int< uint32_t >::type_name ( )

Definition at line 53 of file oct-inttypes.cc.

◆ type_name() [8/9]

const char * octave_int< uint64_t >::type_name ( )

Definition at line 54 of file oct-inttypes.cc.

◆ type_name() [9/9]

template<typename T >
static const char* octave_int< T >::type_name ( )
static

◆ value()

template<typename T >
T octave_int< T >::value ( ) const
inline

Definition at line 832 of file oct-inttypes.h.

Referenced by convert_index(), mod(), operator-(), operator<<(), pow(), rem(), stream::seek(), xinit(), xmax(), and xmin().

Member Data Documentation

◆ s_one

template<typename T >
const octave_int< T > octave_int< T >::s_one
static

Definition at line 908 of file oct-inttypes.h.

◆ s_zero

template<typename T >
const octave_int< T > octave_int< T >::s_zero
static

Definition at line 908 of file oct-inttypes.h.


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