NeoPZ
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
TPZFlopCounter Class Reference

This class implements floating point number associated with a counter of the operations performed with it by type.
(arithmetic, trigonometric, exponencial and logarithmic operations performed with it). Common. More...

#include <pzreal.h>

Collaboration diagram for TPZFlopCounter:
[legend]

Public Member Functions

 TPZFlopCounter ()
 
 TPZFlopCounter (const double &val)
 
REAL val () const
 
 operator REAL () const
 
bool operator<= (const REAL &val) const
 
bool operator< (const REAL &val) const
 
bool operator> (const REAL &val) const
 
bool operator>= (const REAL &val) const
 
bool operator== (const REAL &val) const
 
TPZFlopCounter operator* (const TPZFlopCounter &oth) const
 Returns the product with the oth value and increments the counter of the products. More...
 
TPZFlopCounter operator/ (const TPZFlopCounter &oth) const
 Returns the division between oth value and increments the counter of the divisions. More...
 
TPZFlopCounter operator* (const REAL &oth) const
 Returns the product with the oth value and increments the counter of the products. More...
 
TPZFlopCounter operator/ (const double &oth) const
 Returns the division between oth value and increments the counter of the divisions. More...
 
TPZFlopCounter operator+ (const TPZFlopCounter &oth) const
 Returns the sum with oth value and increments the counter of the sums. More...
 
TPZFlopCounter operator- (const TPZFlopCounter &oth) const
 Returns the difference with oth value and increments the counter of the sums. More...
 
TPZFlopCounteroperator+= (const TPZFlopCounter &oth)
 Performs the sum with oth value on own value and increments the counter of the sums. More...
 
TPZFlopCounteroperator-= (const TPZFlopCounter &oth)
 Performs the diference with oth value on own value and increments the counter of the sums. More...
 
TPZFlopCounteroperator*= (const TPZFlopCounter &oth)
 Performs the product with oth value on own value and increments the counter of the products. More...
 
TPZFlopCounteroperator/= (const TPZFlopCounter &oth)
 Performs the division between oth value on own value and increments the counter of the divisions. More...
 
TPZFlopCounter operator- () const
 Returns value with signal changed of its floating point value and increments the counter of the sums. More...
 
TPZFlopCounter operator+ () const
 Returns the current floating point value and doesn't increments the counters. More...
 
bool operator< (const TPZFlopCounter &sec) const
 Compares the values and doesn't increments the counters. More...
 
bool operator> (const TPZFlopCounter &sec) const
 Compares the values and doesn't increments the counters. More...
 
bool operator<= (const TPZFlopCounter &sec) const
 Compares the values and doesn't increments the counters. More...
 
bool operator>= (const TPZFlopCounter &sec) const
 Compares the values and doesn't increments the counters. More...
 
bool operator== (const TPZFlopCounter &sec) const
 Compares the values and doesn't increments the counters. More...
 
bool operator!= (const TPZFlopCounter &sec) const
 Compares the values and doesn't increments the counters. More...
 

Public Attributes

REAL fVal
 Floating point value. More...
 

Static Public Attributes

static TPZCounter gCount
 Containts the counter vector by operation performed. More...
 

Friends

TPZFlopCounter sqrt (const TPZFlopCounter &orig)
 Returns the square root of the value and increments the counter of the square root. More...
 
TPZFlopCounter pow (const TPZFlopCounter &orig, const TPZFlopCounter &xp)
 Returns the power and increments the counter of the power. More...
 
TPZFlopCounter fabsFlop (const TPZFlopCounter &orig)
 Returns the absolute value and doesn't increments the counters. More...
 
REAL fabs (const TPZFlopCounter &orig)
 Returns the absolute value as REAL and doesn't increments the counters. More...
 
TPZFlopCounter acos (const TPZFlopCounter &orig)
 Returns the arc cosine in radians and increments the counter of the Arc Cosine. More...
 
TPZFlopCounter cos (const TPZFlopCounter &orig)
 Returns the cosine in radians and increments the counter of the Cosine. More...
 
TPZFlopCounter asin (const TPZFlopCounter &orig)
 Returns the arc sine in radians and increments the counter of the Arc Sine. More...
 
TPZFlopCounter sin (const TPZFlopCounter &orig)
 Returns the sine in radians and increments the counter of the sine. More...
 
TPZFlopCounter atan (const TPZFlopCounter &orig)
 Returns the arc tangent in radians and increments the counter of the Arc Tangent. More...
 
TPZFlopCounter atan2 (const TPZFlopCounter &val1, const TPZFlopCounter &val2)
 Returns the arc tangent in radians and increments the counter of the Arc Tangent.
ATAN2 returns the arc tangent of x(val1) and y(val2) coordinates as an angle expressed in radians. More...
 
TPZFlopCounter exp (const TPZFlopCounter &val)
 Returns the exponencial and increments the counter of the Exponencial. More...
 
TPZFlopCounter log (const TPZFlopCounter &val)
 Returns the natural logarithm and increment the counter of the logarithm. More...
 
TPZFlopCounter log10 (const TPZFlopCounter &val)
 Returns the decimal logarithm and increment the counter of the logarithm. More...
 

Detailed Description

This class implements floating point number associated with a counter of the operations performed with it by type.
(arithmetic, trigonometric, exponencial and logarithmic operations performed with it). Common.

By modifying the definition of the type of REAL, the number of floating point operations can be counted.
To modify you need to define "REALpzfpcounter": #define REALpzfpcounter .

Note
How to sure the counter initializing from ZERO ??? I don't see where the counter vector is clean. (Jorge)

Definition at line 261 of file pzreal.h.

Constructor & Destructor Documentation

◆ TPZFlopCounter() [1/2]

TPZFlopCounter::TPZFlopCounter ( )
inline

Definition at line 272 of file pzreal.h.

◆ TPZFlopCounter() [2/2]

TPZFlopCounter::TPZFlopCounter ( const double &  val)
inline

Definition at line 275 of file pzreal.h.

Member Function Documentation

◆ operator REAL()

TPZFlopCounter::operator REAL ( ) const
inline

Definition at line 285 of file pzreal.h.

◆ operator!=()

bool TPZFlopCounter::operator!= ( const TPZFlopCounter sec) const
inline

Compares the values and doesn't increments the counters.

Definition at line 428 of file pzreal.h.

References acos(), asin(), atan(), atan2(), cos(), exp(), fabs(), fabsFlop(), fVal, log(), log10(), pow(), sin(), sqrt(), and val().

◆ operator*() [1/2]

TPZFlopCounter TPZFlopCounter::operator* ( const TPZFlopCounter oth) const
inline

Returns the product with the oth value and increments the counter of the products.

Definition at line 311 of file pzreal.h.

References EProd, TPZCounter::fCount, and fVal.

◆ operator*() [2/2]

TPZFlopCounter TPZFlopCounter::operator* ( const REAL &  oth) const
inline

Returns the product with the oth value and increments the counter of the products.

Definition at line 328 of file pzreal.h.

References EProd, TPZCounter::fCount, and fVal.

◆ operator*=()

TPZFlopCounter& TPZFlopCounter::operator*= ( const TPZFlopCounter oth)
inline

Performs the product with oth value on own value and increments the counter of the products.

Definition at line 376 of file pzreal.h.

References EProd, TPZCounter::fCount, and fVal.

◆ operator+() [1/2]

TPZFlopCounter TPZFlopCounter::operator+ ( const TPZFlopCounter oth) const
inline

Returns the sum with oth value and increments the counter of the sums.

Definition at line 345 of file pzreal.h.

References ESum, TPZCounter::fCount, and fVal.

◆ operator+() [2/2]

TPZFlopCounter TPZFlopCounter::operator+ ( ) const
inline

Returns the current floating point value and doesn't increments the counters.

Definition at line 398 of file pzreal.h.

◆ operator+=()

TPZFlopCounter& TPZFlopCounter::operator+= ( const TPZFlopCounter oth)
inline

Performs the sum with oth value on own value and increments the counter of the sums.

Definition at line 362 of file pzreal.h.

References ESum, TPZCounter::fCount, and fVal.

◆ operator-() [1/2]

TPZFlopCounter TPZFlopCounter::operator- ( const TPZFlopCounter oth) const
inline

Returns the difference with oth value and increments the counter of the sums.

Definition at line 354 of file pzreal.h.

References ESum, TPZCounter::fCount, and fVal.

◆ operator-() [2/2]

TPZFlopCounter TPZFlopCounter::operator- ( ) const
inline

Returns value with signal changed of its floating point value and increments the counter of the sums.

Definition at line 390 of file pzreal.h.

References ESum, TPZCounter::fCount, and fVal.

◆ operator-=()

TPZFlopCounter& TPZFlopCounter::operator-= ( const TPZFlopCounter oth)
inline

Performs the diference with oth value on own value and increments the counter of the sums.

Definition at line 369 of file pzreal.h.

References ESum, TPZCounter::fCount, and fVal.

◆ operator/() [1/2]

TPZFlopCounter TPZFlopCounter::operator/ ( const TPZFlopCounter oth) const
inline

Returns the division between oth value and increments the counter of the divisions.

Definition at line 319 of file pzreal.h.

References EDiv, TPZCounter::fCount, and fVal.

◆ operator/() [2/2]

TPZFlopCounter TPZFlopCounter::operator/ ( const double &  oth) const
inline

Returns the division between oth value and increments the counter of the divisions.

Definition at line 336 of file pzreal.h.

References EDiv, TPZCounter::fCount, and fVal.

◆ operator/=()

TPZFlopCounter& TPZFlopCounter::operator/= ( const TPZFlopCounter oth)
inline

Performs the division between oth value on own value and increments the counter of the divisions.

Definition at line 383 of file pzreal.h.

References EDiv, TPZCounter::fCount, and fVal.

◆ operator<() [1/2]

bool TPZFlopCounter::operator< ( const REAL &  val) const
inline

Definition at line 294 of file pzreal.h.

References val().

◆ operator<() [2/2]

bool TPZFlopCounter::operator< ( const TPZFlopCounter sec) const
inline

Compares the values and doesn't increments the counters.

Definition at line 403 of file pzreal.h.

References fVal.

◆ operator<=() [1/2]

bool TPZFlopCounter::operator<= ( const REAL &  val) const
inline

Definition at line 289 of file pzreal.h.

References val().

◆ operator<=() [2/2]

bool TPZFlopCounter::operator<= ( const TPZFlopCounter sec) const
inline

Compares the values and doesn't increments the counters.

Definition at line 413 of file pzreal.h.

References fVal.

◆ operator==() [1/2]

bool TPZFlopCounter::operator== ( const REAL &  val) const
inline

Definition at line 306 of file pzreal.h.

References val().

◆ operator==() [2/2]

bool TPZFlopCounter::operator== ( const TPZFlopCounter sec) const
inline

Compares the values and doesn't increments the counters.

Definition at line 423 of file pzreal.h.

References fVal.

◆ operator>() [1/2]

bool TPZFlopCounter::operator> ( const REAL &  val) const
inline

Definition at line 298 of file pzreal.h.

References val().

◆ operator>() [2/2]

bool TPZFlopCounter::operator> ( const TPZFlopCounter sec) const
inline

Compares the values and doesn't increments the counters.

Definition at line 408 of file pzreal.h.

References fVal.

◆ operator>=() [1/2]

bool TPZFlopCounter::operator>= ( const REAL &  val) const
inline

Definition at line 302 of file pzreal.h.

References val().

◆ operator>=() [2/2]

bool TPZFlopCounter::operator>= ( const TPZFlopCounter sec) const
inline

Compares the values and doesn't increments the counters.

Definition at line 418 of file pzreal.h.

References fVal.

◆ val()

REAL TPZFlopCounter::val ( ) const
inline

Definition at line 280 of file pzreal.h.

Friends And Related Function Documentation

◆ acos

TPZFlopCounter acos ( const TPZFlopCounter orig)
friend

Returns the arc cosine in radians and increments the counter of the Arc Cosine.

Definition at line 496 of file pzreal.h.

◆ asin

TPZFlopCounter asin ( const TPZFlopCounter orig)
friend

Returns the arc sine in radians and increments the counter of the Arc Sine.

Definition at line 505 of file pzreal.h.

◆ atan

TPZFlopCounter atan ( const TPZFlopCounter orig)
friend

Returns the arc tangent in radians and increments the counter of the Arc Tangent.

Definition at line 532 of file pzreal.h.

◆ atan2

TPZFlopCounter atan2 ( const TPZFlopCounter val1,
const TPZFlopCounter val2 
)
friend

Returns the arc tangent in radians and increments the counter of the Arc Tangent.
ATAN2 returns the arc tangent of x(val1) and y(val2) coordinates as an angle expressed in radians.

Definition at line 544 of file pzreal.h.

◆ cos

TPZFlopCounter cos ( const TPZFlopCounter orig)
friend

Returns the cosine in radians and increments the counter of the Cosine.

Definition at line 514 of file pzreal.h.

◆ exp

TPZFlopCounter exp ( const TPZFlopCounter val)
friend

Returns the exponencial and increments the counter of the Exponencial.

Definition at line 553 of file pzreal.h.

◆ fabs

REAL fabs ( const TPZFlopCounter orig)
friend

Returns the absolute value as REAL and doesn't increments the counters.

Definition at line 481 of file pzreal.h.

◆ fabsFlop

TPZFlopCounter fabsFlop ( const TPZFlopCounter orig)
friend

Returns the absolute value and doesn't increments the counters.

Definition at line 474 of file pzreal.h.

◆ log

TPZFlopCounter log ( const TPZFlopCounter val)
friend

Returns the natural logarithm and increment the counter of the logarithm.

Definition at line 562 of file pzreal.h.

◆ log10

TPZFlopCounter log10 ( const TPZFlopCounter val)
friend

Returns the decimal logarithm and increment the counter of the logarithm.

Definition at line 571 of file pzreal.h.

◆ pow

TPZFlopCounter pow ( const TPZFlopCounter orig,
const TPZFlopCounter xp 
)
friend

Returns the power and increments the counter of the power.

Definition at line 487 of file pzreal.h.

◆ sin

TPZFlopCounter sin ( const TPZFlopCounter orig)
friend

Returns the sine in radians and increments the counter of the sine.

Definition at line 523 of file pzreal.h.

◆ sqrt

TPZFlopCounter sqrt ( const TPZFlopCounter orig)
friend

Returns the square root of the value and increments the counter of the square root.

Definition at line 465 of file pzreal.h.

Member Data Documentation

◆ fVal

REAL TPZFlopCounter::fVal

◆ gCount

TPZCounter TPZFlopCounter::gCount
static

Containts the counter vector by operation performed.

Definition at line 270 of file pzreal.h.

Referenced by acos(), asin(), atan(), atan2(), cos(), exp(), log(), log10(), main(), pow(), sin(), sqrt(), and RunStat::~RunStat().


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