Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/Math/Number/NbOperator1.hpp File Reference

Go to the source code of this file.

Functions

BOOL isEqualTo (const NUMBER &l, const NUMBER &r)
BOOL isLessThan (const NUMBER &l, const NUMBER &r)
BOOL isBiggerThan (const NUMBER &l, const NUMBER &r)
BOOL operator== (const NUMBER &l, const NUMBER &r)
BOOL operator!= (const NUMBER &l, const NUMBER &r)
BOOL operator< (const NUMBER &l, const NUMBER &r)
BOOL operator<= (const NUMBER &l, const NUMBER &r)
BOOL operator> (const NUMBER &l, const NUMBER &r)
BOOL operator>= (const NUMBER &l, const NUMBER &r)
NUMBER add (const NUMBER &l, const NUMBER &r)
NUMBER sub (const NUMBER &l, const NUMBER &r)
NUMBER mult (const NUMBER &l, const NUMBER &r)
NUMBER div (const NUMBER &l, const NUMBER &r)
NUMBER operator+ (const NUMBER &l, const NUMBER &r)
NUMBER operator- (const NUMBER &l, const NUMBER &r)
NUMBER operator * (const NUMBER &l, const NUMBER &r)
NUMBER operator/ (const NUMBER &l, const NUMBER &r)
const NUMBER & operator= (const NUMBER &N)
NUMBER operator! ()
NUMBER operator- ()
NUMBER operator-- ()
NUMBER operator-- (int)
NUMBER operator++ ()
NUMBER operator++ (int)


Function Documentation

friend NUMBER add const NUMBER &    l,
const NUMBER &    r
 

Definition at line 98 of file NbOperator1.hpp.

00098                                                         {             
00099     MathState s = MathStateAdd[ (int)l.state ][ (int)r.state ];       
00100     return NUMBER( l.value + r.value, s );                            
00101   }                                                                   

friend NUMBER div const NUMBER &    l,
const NUMBER &    r
 

Definition at line 113 of file NbOperator1.hpp.

00113                                                         {             
00114     MathState s = MathStateDiv[ (int)l.state ][ (int)r.state ];       
00115     if ( s != Valid ) return NUMBER( l.value, s );                    
00116     return NUMBER( l.value / r.value, s );                            
00117   }                                                                   

friend BOOL isBiggerThan const NUMBER &    l,
const NUMBER &    r
 

Definition at line 67 of file NbOperator1.hpp.

00067                                                                {      
00068     int temp = MathStateBiggerThan[ (int)l.state ][ (int)r.state ];   
00069     if ( temp < 2 ) return (BOOL)temp;                                
00070     return (l.value >  r.value);                                      
00071   }                                                                   

friend BOOL isEqualTo const NUMBER &    l,
const NUMBER &    r
 

Definition at line 55 of file NbOperator1.hpp.

00055                                                             {         
00056     int temp = MathStateEqualTo[ (int)l.state ][ (int)r.state ];      
00057     if ( temp < 2 ) return (BOOL)temp;                                
00058     return ( l.value == r.value );                                    
00059   }                                                                   

friend BOOL isLessThan const NUMBER &    l,
const NUMBER &    r
 

Definition at line 61 of file NbOperator1.hpp.

00061                                                              {        
00062     int temp = MathStateLessThan[ (int)l.state ][ (int)r.state ];     
00063     if ( temp < 2 ) return (BOOL)temp;                                
00064     return (l.value <  r.value);                                      
00065   }                                                                   

friend NUMBER mult const NUMBER &    l,
const NUMBER &    r
 

Definition at line 108 of file NbOperator1.hpp.

00108                                                          {            
00109     MathState s = MathStateMult[ (int)l.state ][ (int)r.state ];      
00110     return NUMBER( l.value * r.value, s );                            
00111   }                                                                   

friend NUMBER operator * const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 127 of file NbOperator1.hpp.

00127                                                                      {
00128     return mult( l, r );                                              
00129   }                                                                   

NUMBER operator!   [inline]
 

Definition at line 142 of file NbOperator1.hpp.

00142                             {                                         
00143     return NUMBER( (TYPE)!value, state );                                  
00144   }                                                                   

friend BOOL operator!= const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 77 of file NbOperator1.hpp.

00077                                                                     { 
00078     return  !isEqualTo( l, r );                                       
00079   }                                                                   

friend NUMBER operator+ const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 119 of file NbOperator1.hpp.

00119                                                                      {
00120     return add( l, r );                                               
00121   }                                                                   

NUMBER operator++ int    [inline]
 

Definition at line 167 of file NbOperator1.hpp.

00167                                   {                                   
00168     value++;                                                          
00169     return *this;                                                     
00170   }                                                                   

NUMBER operator++   [inline]
 

Definition at line 162 of file NbOperator1.hpp.

00162                              {                                        
00163     ++value;                                                          
00164     return *this;                                                     
00165   }                                                                   

NUMBER operator-   [inline]
 

Definition at line 146 of file NbOperator1.hpp.

00146                             {                                         
00147     if ( (int)state < 4 ) return NUMBER( (TYPE)( -1 * value ), Valid );      
00148     return NUMBER( (TYPE)( -1 * value ), state );                            
00149   }                                                                   

friend NUMBER operator- const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 123 of file NbOperator1.hpp.

00123                                                                      {
00124     return sub( l, r );                                               
00125   }                                                                   

NUMBER operator-- int    [inline]
 

Definition at line 157 of file NbOperator1.hpp.

00157                                   {                                   
00158     value--;                                                          
00159     return *this;                                                     
00160   }                                                                   

NUMBER operator--   [inline]
 

Definition at line 152 of file NbOperator1.hpp.

00152                              {                                        
00153     --value;                                                          
00154     return *this;                                                     
00155   }                                                                   

friend NUMBER operator/ const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 131 of file NbOperator1.hpp.

00131                                                                      {
00132     return div( l, r );                                               
00133   }                                                                   

friend BOOL operator< const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 81 of file NbOperator1.hpp.

00081                                                                     { 
00082     return  isLessThan( l, r );                                       
00083   }                                                                   

friend BOOL operator<= const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 85 of file NbOperator1.hpp.

00085                                                                     { 
00086     return  ( isLessThan( l, r ) || isEqualTo( l, r ) );              
00087   }                                                                   

const NUMBER& operator= const NUMBER &    N [inline]
 

Definition at line 136 of file NbOperator1.hpp.

00136                                                    {                  
00137     value = N.value;                                                 
00138     state = N.state;                                                
00139     return *this;                                                     
00140   }                                                                   

friend BOOL operator== const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 73 of file NbOperator1.hpp.

00073                                                                     { 
00074     return   isEqualTo( l, r );                                       
00075   }                                                                   

friend BOOL operator> const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 89 of file NbOperator1.hpp.

00089                                                                     { 
00090     return  isBiggerThan( l, r );                                     
00091   }                                                                   

friend BOOL operator>= const NUMBER &    l,
const NUMBER &    r
[inline]
 

Definition at line 93 of file NbOperator1.hpp.

00093                                                                     { 
00094     return  ( isBiggerThan( l, r ) || isEqualTo( l, r ) );            
00095   }                                                                   

friend NUMBER sub const NUMBER &    l,
const NUMBER &    r
 

Definition at line 103 of file NbOperator1.hpp.

00103                                                         {             
00104     MathState s = MathStateSub[ (int)l.state ][ (int)r.state ];       
00105     return NUMBER( l.value - r.value, s );                            
00106   }                                                                   


Generated on Sun Oct 14 18:46:59 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001