30 #include "../common/progress/TaskProgress.h" 31 #include "../common/StringUtils.h" 32 #include "../raster/Raster.h" 33 #include "../raster/Band.h" 34 #include "../memory/ExpansibleRaster.h" 35 #include "../srs/Converter.h" 108 m_outputRasterPtr.reset();
118 m_outputRasterPtr.reset();
146 unsigned int operationsNumber = 0;
148 for(
unsigned sIdx = 0 ; sIdx < arithmetic_string.size() ; ++sIdx )
151 auxStr.push_back( arithmetic_string[ sIdx ] );
153 if(
isOperator( auxStr ) ) ++operationsNumber;
159 std::unique_ptr< te::common::TaskProgress > progressPtr;
164 progressPtr->setTotalSteps( static_cast<int>(operationsNumber) );
166 progressPtr->setMessage(
"Arithmetic Operations" );
171 std::unique_ptr<te::rst::Raster> auxRasterPtr;
174 "Arithmetic string execution error" );
180 std::vector< te::rst::BandProperty* > bandsProperties;
185 bandsProperties[ 0 ]->m_type = auxRasterPtr->getBand( 0 )->getProperty()->m_type;
186 bandsProperties[ 0 ]->m_noDataValue = auxRasterPtr->getBand( 0 )->getProperty()->m_noDataValue;
198 "Output raster creation error" );
202 double outputOffset = 0;
203 double outputGain = 1.0;
215 double outAllowedMin = 0;
216 double outAllowedMax = 0;
218 outAllowedMin, outAllowedMax );
220 const unsigned int nRows =
static_cast<unsigned int>(auxRasterPtr->getNumberOfRows());
221 const unsigned int nCols =
static_cast<unsigned int>(auxRasterPtr->getNumberOfColumns());
222 unsigned int row = 0;
223 unsigned int col = 0;
228 double auxMin = DBL_MAX;
229 double auxMax = -1.0 * auxMin;
231 for( row = 0 ; row < nRows ; ++row )
233 for( col = 0 ; col <
nCols ; ++
col )
235 auxRasterRef.
getValue( col, row, value, 0 );
237 if( auxNoDataValue != value )
239 if( auxMin > value ) auxMin = value;
240 if( auxMax < value ) auxMax = value;
245 if( ( auxMin != DBL_MAX ) && ( auxMax != ( -1.0 * DBL_MAX ) ) &&
246 ( auxMax != auxMin ) )
248 outputOffset = -1.0 * auxMin;
249 outputGain = ( ( outAllowedMax - outAllowedMin ) / ( auxMax - auxMin ) );
256 const unsigned int nRows =
static_cast<unsigned int>(auxRasterPtr->getNumberOfRows());
257 const unsigned int nCols =
static_cast<unsigned int>(auxRasterPtr->getNumberOfColumns());
258 unsigned int row = 0;
259 unsigned int col = 0;
265 double outAllowedMin = 0;
266 double outAllowedMax = 0;
268 outAllowedMin, outAllowedMax );
270 for( row = 0 ; row < nRows ; ++row )
272 for( col = 0 ; col <
nCols ; ++
col )
274 auxRasterRef.
getValue( col, row, value, 0 );
276 if( auxNoDataValue == value )
278 outRasterRef.
setValue( col, row, outNoDataValue, 0 );
282 value += outputOffset;
284 value =
MIN( value, outAllowedMax );
285 value =
MAX( value, outAllowedMin );
287 outRasterRef.
setValue( col, row, value, 0 );
317 "Invalid number of rasters" );
330 "Arithmetic string is empty" )
332 std::unique_ptr<te::rst::Raster> rasterNull;
347 const std::vector< te::rst::Raster* >& inRasters,
348 std::unique_ptr<te::rst::Raster>& outRaster,
352 std::vector< std::string > infixTokensVec;
355 if( infixTokensVec.size() )
357 std::vector< std::string > postfixTokensVec;
362 unsigned int auxRasterIdx = 0;
363 unsigned int auxBandIdx = 0;
364 double auxRealValue = 0;
366 for(
unsigned int tIdx = 0 ; tIdx < postfixTokensVec.size() ; ++tIdx )
368 const std::string& curToken = postfixTokensVec[ tIdx ];
373 "Invalid raster index found at " + curToken );
376 "Invalid band index" );
383 execStack.push( auxEle );
391 execStack.push( auxEle );
396 "Operator " + curToken +
" execution error" );
404 progressPtr->
pulse();
410 "Operator " + curToken +
" execution error" );
418 progressPtr->
pulse();
430 outRaster.reset( execStack.top().m_rasterHandler.release() );
437 std::vector< std::string >& output )
const 441 std::stack< std::string > auxStack;
442 const unsigned int inputSize =
static_cast<unsigned int>(input.size());
444 for(
unsigned int inIdx = 0 ; inIdx < inputSize ; ++inIdx )
446 const std::string& currInToken = input[ inIdx ];
450 while( ( ! auxStack.empty() ) && ( auxStack.top() !=
"(" ) )
454 output.push_back( auxStack.top() );
464 auxStack.push( currInToken );
466 else if( currInToken ==
"(" )
468 auxStack.push( currInToken );
470 else if( currInToken ==
")" )
472 while ( ( ! auxStack.empty() ) && ( auxStack.top() !=
"(" ) )
474 output.push_back( auxStack.top() );
479 if ( ! auxStack.empty() )
486 output.push_back( currInToken );
490 while ( ! auxStack.empty() )
492 output.push_back( auxStack.top() );
500 std::cout << std::endl;
502 for(
unsigned int idx = 0 ; idx < input.size() ; ++idx )
504 std::cout <<
"[" << input[ idx ] <<
"]";
507 std::cout << std::endl;
518 return ( ( inputToken ==
"+" ) || ( inputToken ==
"-" ) ||
519 (inputToken ==
"*") || (inputToken ==
"/") || (inputToken ==
"^")) ?
525 return ((inputToken ==
"sqrt") || (inputToken ==
"sin") || (inputToken ==
"asin") ||
526 (inputToken ==
"cos") || (inputToken ==
"acos") || (inputToken ==
"log") ||
527 (inputToken ==
"tan") || (inputToken ==
"atan") || (inputToken ==
"ln")) ?
532 const std::string& operator2 )
const 534 if( ( operator1 ==
"*" ) || ( operator1 ==
"/" ) )
540 if( ( operator2 ==
"+" ) || ( operator2 ==
"-" ) )
550 unsigned int& bandIdx )
const 552 if( token.size() < 4 )
return false;
553 if( token[ 0 ] !=
'R' )
return false;
555 std::string rasterIdxStr;
556 unsigned int tIdx = 1;
558 while( ( tIdx < token.size() ) && isdigit( token[ tIdx ] ) )
560 rasterIdxStr.push_back( token[ tIdx ] );
564 if( token[ tIdx ] !=
':' )
return false;
567 std::string bandIdxStr;
569 while( ( tIdx < token.size() ) && isdigit( token[ tIdx ] ) )
571 bandIdxStr.push_back( token[ tIdx ] );
575 if( ( rasterIdxStr.size() ) && ( bandIdxStr.size() ) )
577 rasterIdx =
static_cast<unsigned int>(atoi( rasterIdxStr.c_str() ));
578 bandIdx =
static_cast<unsigned int>(atoi( bandIdxStr.c_str() ));
588 execStack,
bool generateOutput )
const 590 if( execStack.size() < 2 )
609 else if( token ==
"-" )
613 else if( token ==
"*" )
617 else if( token ==
"/" )
621 else if (token ==
"^")
643 "Operator execution error" );
651 "Operator execution error" );
659 "Operator execution error" );
668 execStack.push( outElement );
676 const unsigned int band2Idx,
678 std::unique_ptr<te::rst::Raster>& outRasterPtr )
const 695 unsigned int row = 0;
696 unsigned int col = 0;
701 for( row = 0 ; row < nRows ; ++row )
703 for( col = 0 ; col <
nCols ; ++
col )
705 inBand1.
getValue( col, row, value1 );
706 inBand2.
getValue( col, row, value2 );
708 if( ( value1 != inNoData1 ) && ( value2 != inNoData2 ) )
710 (this->*binOptFunctPtr)( value1, value2, outValue );
711 outBand.
setValue( col, row, outValue );
715 outBand.
setValue( col, row, outNoData );
727 double overlapULCol1 = 0;
728 double overpalULRow1 = 0;
729 inRaster1.
getGrid()->
geoToGrid( extent2.getLowerLeftX(), extent2.getUpperRightY(),
730 overlapULCol1, overpalULRow1 );
731 overlapULCol1 = std::max( 0.0, std::min( static_cast<double>( inRaster1.
getNumberOfColumns()
732 - 1 ), overlapULCol1 ) );
733 overpalULRow1 = std::max( 0.0, std::min( static_cast<double>( inRaster1.
getNumberOfRows()
734 - 1 ), overpalULRow1 ) );
736 double overlapLRCol1 = 0;
737 double overlapLRRow1 = 0;
738 inRaster1.
getGrid()->
geoToGrid( extent2.getUpperRightX(), extent2.getLowerLeftY(),
739 overlapLRCol1, overlapLRRow1 );
740 overlapLRCol1 = std::max( 0.0, std::min( static_cast<double>( inRaster1.
getNumberOfColumns()
741 - 1 ), overlapLRCol1 ) );
742 overlapLRRow1 = std::max( 0.0, std::min( static_cast<double>( inRaster1.
getNumberOfRows()
743 - 1 ), overlapLRRow1 ) );
745 const unsigned int overlapFirstCol1 =
static_cast<unsigned int>(std::floor( overlapULCol1 ));
746 const unsigned int overlapFirstRow1 =
static_cast<unsigned int>(std::floor( overpalULRow1 ));
747 const unsigned int overlapLastCol1 =
static_cast<unsigned int>(std::ceil( overlapLRCol1 ));
748 const unsigned int overlapLastRow1 =
static_cast<unsigned int>(std::ceil( overlapLRRow1 ));
761 unsigned int row1 = 0;
762 unsigned int col1 = 0;
766 std::complex< double > value2;
773 for( row1 = 0 ; row1 < nRows1 ; ++row1 )
775 for( col1 = 0 ; col1 < nCols1 ; ++col1 )
777 if( ( row1 >= overlapFirstRow1 ) && ( row1 <= overlapLastRow1 ) &&
778 ( col1 >= overlapFirstCol1 ) && ( col1 <= overlapLastCol1 ) )
780 grid1.
gridToGeo( static_cast<double>(col1), static_cast<double>(row1), currX1, currY1 );
781 converter.convert( currX1, currY1, currX2, currY2 );
782 grid2.
geoToGrid( currX2, currY2, col2, row2 );
784 inBand1.
getValue( col1, row1, value1 );
785 interpolator2.getValue( col2, row2, value2, band2Idx );
787 if( ( value1 != inNoData1 ) && ( value2.real() != inNoData2 ) )
789 (this->*binOptFunctPtr)( value1, value2.real(), outValue );
790 outBand.
setValue( col1, row1, outValue );
794 outBand.
setValue( col1, row1, outNoData );
799 outBand.
setValue( col1, row1, outNoData );
812 const unsigned int bandIdx,
const double value,
814 std::unique_ptr<te::rst::Raster>& outRasterPtr,
815 const bool realNumberIsRigthtTerm )
const 828 unsigned int row = 0;
829 unsigned int col = 0;
833 if( realNumberIsRigthtTerm )
835 for( row = 0 ; row < nRows ; ++row )
837 for( col = 0 ; col <
nCols ; ++
col )
839 inBand.
getValue( col, row, value1 );
841 if( value1 != inNoData )
843 (this->*binOptFunctPtr)( value1, value, outValue );
844 outBand.
setValue( col, row, outValue );
848 outBand.
setValue( col, row, outNoData );
855 for( row = 0 ; row < nRows ; ++row )
857 for( col = 0 ; col <
nCols ; ++
col )
859 inBand.
getValue( col, row, value1 );
861 if( value1 != inNoData )
863 (this->*binOptFunctPtr)( value, value1, outValue );
864 outBand.
setValue( col, row, outValue );
868 outBand.
setValue( col, row, outNoData );
878 execStack,
bool generateOutput )
const 880 if (execStack.size() != 1)
896 else if (token ==
"sin")
900 else if (token ==
"asin")
904 else if (token ==
"cos")
908 else if (token ==
"acos")
912 else if (token ==
"log")
916 else if (token ==
"tan")
920 else if (token ==
"atan")
924 else if (token ==
"ln")
946 "Operator execution error");
955 execStack.push(outElement);
962 const unsigned int bandIdx,
964 std::unique_ptr<te::rst::Raster>& outRasterPtr)
const 977 unsigned int row = 0;
978 unsigned int col = 0;
982 for (row = 0; row < nRows; ++row)
988 if ((value != inNoData))
990 (this->*unaryOptFunctPtr)(value, outValue);
991 outBand.
setValue(col, row, outValue);
995 outBand.
setValue(col, row, outNoData);
1005 std::unique_ptr<te::rst::Raster>& outRasterPtr,
1006 const bool realNumberIsRigthtTerm)
const 1008 const unsigned int nRows = outRasterPtr->getNumberOfRows();
1009 const unsigned int nCols = outRasterPtr->getNumberOfColumns();
1012 unsigned int row = 0;
1013 unsigned int col = 0;
1014 double outValue = 0;
1016 if (realNumberIsRigthtTerm)
1018 for (row = 0; row < nRows; ++row)
1022 if (value != outNoData)
1024 (this->*unaryOptFunctPtr)(value, outValue);
1025 outBand.
setValue(col, row, outValue);
1029 outBand.
setValue(col, row, outNoData);
1040 if( token.size() == 0 )
return false;
1041 bool hasDot =
false;
1043 unsigned int initIdx = 0;
1044 if( ( token[ 0 ] ==
'+' ) || ( token[ 0 ] ==
'-' ) )
1046 if( token.size() == 1 )
return false;
1050 for(
unsigned int tIdx = initIdx ; tIdx < token.size() ; ++tIdx )
1052 if( token[ tIdx ] ==
'.' )
1054 if( hasDot )
return false;
1057 else if( ! isdigit( token[ tIdx ] ) )
return false;
1060 realValue = atof( token.c_str() );
1066 std::unique_ptr<te::rst::Raster>& rasterPtr )
const 1068 std::map<std::string, std::string> rinfo;
1070 std::vector< te::rst::BandProperty * > bandsProperties;
1072 bandsProperties[ 0 ]->m_noDataValue = std::numeric_limits< double >::max();
1074 bandsProperties[ 0 ]->m_blkh = 1;
1075 bandsProperties[ 0 ]->m_nblocksx = 1;
1076 bandsProperties[ 0 ]->m_nblocksy =
static_cast<int>(grid.
getNumberOfRows());
1079 grid ), bandsProperties ) );
1085 std::vector< std::string >& outTokens )
const 1089 const unsigned int inputStrSize =
static_cast<unsigned int>(inputStr.size());
1090 std::string bufferStr;
1092 for(
unsigned int inputStrIdx = 0 ; inputStrIdx < inputStrSize ;
1095 if( inputStr[ inputStrIdx ] ==
' ' )
1098 if( bufferStr.size() )
1100 outTokens.push_back( bufferStr );
1106 if( ( inputStr[ inputStrIdx ] ==
'+' ) ||
1107 ( inputStr[ inputStrIdx ] ==
'-' ) )
1109 bufferStr.append( inputStr.substr( inputStrIdx, 1 ) );
1111 else if( ( inputStr[ inputStrIdx ] ==
')' ) ||
1112 ( inputStr[ inputStrIdx ] ==
'(' ) ||
1113 isOperator( inputStr.substr( inputStrIdx, 1 ) ) )
1116 if( bufferStr.size() )
1118 outTokens.push_back( bufferStr );
1122 outTokens.push_back( inputStr.substr( inputStrIdx, 1 ) );
1126 bufferStr.append( inputStr.substr( inputStrIdx, 1 ) );
1131 if( bufferStr.size() )
1133 outTokens.push_back( bufferStr );
void getTokensStrs(const std::string &inputStr, std::vector< std::string > &outTokens) const
Split the input string into a vector of token strings.
void asinUnaryOp(const double &inputValue, double &outputValue) const
Arc sine unary operator function.
void printTokens(const std::vector< std::string > &input) const
Print tokens to stout.
unsigned int getNumberOfRows() const
Returns the grid number of rows.
virtual void setValue(unsigned int c, unsigned int r, const double value, std::size_t b=0)
Sets the attribute value in a band of a cell.
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
void divisionBinOp(const double &inputValue1, const double &inputValue2, double &outputValue) const
Division binary operator function.
Near neighborhood interpolation method.
bool isUnaryOperator(const std::string &inputToken) const
Returns true if the given token is a unary operator.
const OutputParameters & operator=(const OutputParameters ¶ms)
AbstractParameters * clone() const
Create a clone copy of this instance.
void reset() _NOEXCEPT_OP(false)
Clear all internal allocated objects and reset the algorithm to its initial state.
A raster band description.
int getSRID() const
Returns the grid spatial reference system identifier.
unsigned int getNumberOfColumns() const
Returns the raster number of columns.
void cosUnaryOp(const double &inputValue, double &outputValue) const
Cosine unary operator function.
bool isBinaryOperator(const std::string &inputToken) const
Returns true if the given token is a binary operator.
It interpolates one pixel based on a selected algorithm. Methods currently available are Nearest Neig...
void TERPEXPORT GetDataTypeRange(const int dataType, double &min, double &max)
Returns the real data type range (all values that can be represented by the given data type)...
bool m_isInitialized
Tells if this instance is initialized.
This class can be used to inform the progress of a task.
bool execute(AlgorithmOutputParameters &outputParams) _NOEXCEPT_OP(false)
Executes the algorithm using the supplied parameters.
Raster Processing algorithm output parameters base interface.
#define MIN(a, b)
Macro that returns min between two values.
bool execUnaryOperator(const std::string &token, ExecStackT &execStack, bool generateOutput) const
Execute the given unary operator using the current given execution stack.
ArithmeticOperations::InputParameters m_inputParameters
Input execution parameters.
void exponencialBinOp(const double &inputValue1, const double &inputValue2, double &outputValue) const
Exponencial binary operator function.
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
double m_realNumberValue
Real number value.
double m_noDataValue
Value to indicate elements where there is no data, default is std::numeric_limits<double>::max().
bool initialize(const AlgorithmInputParameters &inputParams) _NOEXCEPT_OP(false)
Initialize the algorithm instance making it ready for execution.
Performs arithmetic operation over raster data.
#define MAX(a, b)
Macro that returns max between two values.
bool m_isRaster
true if this is a raster pointer element.
bool isActive() const
Verify if the task is active.
void geoToGrid(const double &x, const double &y, double &col, double &row) const
Get the grid point associated to a spatial location.
void acosUnaryOp(const double &inputValue, double &outputValue) const
Arc cosine unary operator function.
std::stack< ExecStackElement > ExecStackT
Execution stack type definition.
void(ArithmeticOperations::* UnaryOpFuncPtrT)(const double &inputValue1, double &outputValue) const
#define TERP_TRUE_OR_RETURN_FALSE(value, message)
Checks if value is true. For false values a warning message will be logged and a return of context wi...
unsigned int unsigned int nCols
An Envelope defines a 2D rectangular region.
An abstract class for raster data strucutures.
unsigned int getNumberOfRows() const
Returns the raster number of rows.
std::unique_ptr< te::rst::Raster > m_outputRasterPtr
The generated output registered raster.
BandProperty * getProperty()
Returns the band property.
bool execUnaryOperatorReal(const double value, const UnaryOpFuncPtrT unaryOptFunctPtr, std::unique_ptr< te::rst::Raster > &outRasterPtr, const bool realNumberIsRigthtTerm) const
Execute the given unary operator using the given a real number.
ArithmeticOperations output parameters.
unsigned int getNumberOfColumns() const
Returns the grid number of columns.
bool isRasterBandToken(const std::string &token, unsigned int &rasterIdx, unsigned int &bandIdx) const
Returns true if the given token is a raster data token.
void tanUnaryOp(const double &inputValue, double &outputValue) const
Tangent unary operator function.
void pulse()
Calls setCurrentStep() function using getCurrentStep() + 1.
bool execUnaryOperatorRaster(const te::rst::Raster &inRaster, const unsigned int band, const UnaryOpFuncPtrT unaryOptFunctPtr, std::unique_ptr< te::rst::Raster > &outRasterPtr) const
Execute the given unary operator using the given input raster.
A raster band description.
virtual const Band * getBand(std::size_t i) const =0
Returns the raster i-th band.
bool executeString(const std::string &aStr, const std::vector< te::rst::Raster * > &inRasters, std::unique_ptr< te::rst::Raster > &outRaster, bool generateOutput, te::common::TaskProgress *const progressPtr) const
Execute the automata parsing the given input string.
Grid * getGrid()
It returns the raster grid.
void reset() _NOEXCEPT_OP(false)
Clear all internal allocated resources and reset the parameters instance to its initial state...
void sqrtUnaryOp(const double &inputValue, double &outputValue) const
Square root unary operator function.
virtual void getValue(unsigned int c, unsigned int r, double &value, std::size_t b=0) const
Returns the attribute value of a band of a cell.
te::rst::Raster * m_rasterNPtr
Raster pointer.
virtual void setValue(unsigned int c, unsigned int r, const double value)=0
Sets the cell attribute value.
A Converter is responsible for the conversion of coordinates between different Coordinate Systems (CS...
Abstract parameters base interface.
int getSRID() const
Returns the raster spatial reference system identifier.
#define TERP_LOG_AND_RETURN_FALSE(message)
Logs a warning message will and return false.
void(ArithmeticOperations::* BinOpFuncPtrT)(const double &inputValue1, const double &inputValue2, double &outputValue) const
Type definition for a operation function pointer.
bool isRealNumberToken(const std::string &token, double &realValue) const
Returns true if the given token is a real number.
void logUnaryOp(const double &inputValue, double &outputValue) const
Common logarithm unary operator function.
void lnUnaryOp(const double &inputValue, double &outputValue) const
unary operator function.
A raster (stored in memory and eventually swapped to disk) where it is possible to dynamically add li...
void atanUnaryOp(const double &inputValue, double &outputValue) const
Arc Tangent unary operator function.
static Raster * make()
It creates and returns an empty raster with default raster driver.
te::gm::Envelope * getExtent()
Returns the geographic extension of the grid.
void inFix2PostFix(const std::vector< std::string > &input, std::vector< std::string > &output) const
Convert the input tokens vector from the infix notation to postfix notation.
void gridToGeo(const double &col, const double &row, double &x, double &y) const
Get the spatial location of a grid point.
void subtractionBinOp(const double &inputValue1, const double &inputValue2, double &outputValue) const
Subtraction binary operator function.
bool op1HasGreaterOrEqualPrecedence(const std::string &operator1, const std::string &operator2) const
Returns true if operator1 has greater of equal precedence over operator2.
std::unique_ptr< te::rst::Raster > m_rasterHandler
Raster handler.
Raster Processing functions.
unsigned int m_rasterBand
Raster band index.
bool execBinaryOperator(const std::string &token, ExecStackT &execStack, bool generateOutput) const
Execute the given binary operator using the current given execution stack.
bool execBinaryOperatorRasterXRaster(const te::rst::Raster &inRaster1, const unsigned int band1, const te::rst::Raster &inRaster2, const unsigned int band2, const BinOpFuncPtrT binOptFunctPtr, std::unique_ptr< te::rst::Raster > &outRasterPtr) const
Execute the given binary operator using the given input rasters.
bool isInitialized() const
Returns true if the algorithm instance is initialized and ready for execution.
virtual void reset() _NOEXCEPT_OP(false)
Clear all internal allocated objects and reset the algorithm to its initial state.
A rectified grid is the spatial support for raster data.
bool isOperator(const std::string &inputToken) const
Returns true if the given token is an operator.
bool m_isRealNumber
true if this is a real number element.
void transform(int oldsrid, int newsrid)
It will transform the coordinates of the Envelope from the old SRS to the new one.
#define TERP_INSTANCE_TRUE_OR_RETURN_FALSE(value, message)
Checks if value is true. For false values a warning message will be logged, the current instance erro...
bool execBinaryOperatorRasterXReal(const te::rst::Raster &inRaster, const unsigned int bandIdx, const double value, const BinOpFuncPtrT binOptFunctPtr, std::unique_ptr< te::rst::Raster > &outRasterPtr, const bool realNumberIsRigthtTerm) const
Execute the given binary operator using the given input raster and a real number. ...
bool allocResultRaster(const te::rst::Grid &grid, std::unique_ptr< te::rst::Raster > &rasterPtr) const
Allocate a new RAM memory raster.
#define TERP_TRUE_OR_THROW(value, message)
Checks if value is true and throws an exception if not.
void multiplicationBinOp(const double &inputValue1, const double &inputValue2, double &outputValue) const
Multiplication binary operator function.
virtual void getValue(unsigned int c, unsigned int r, double &value) const =0
Returns the cell attribute value.
void sinUnaryOp(const double &inputValue, double &outputValue) const
Sine unary operator function.
void additionBinOp(const double &inputValue1, const double &inputValue2, double &outputValue) const
Addition binary operator function.