![]() |
FLImaging 6.5.8.1
|
A class representing expression. More...
#include <Expression.h>
Public Types | |
enum | EExpressionValid { EExpressionValid_Initialized = 0 , EExpressionValid_Valid , EExpressionValid_Invalid } |
An enum to express whether the expression is valid. More... | |
Public Member Functions | |
CExpression () | |
CExpression (const CExpression &rhs) | |
CExpression (const CExpression *pRhs) | |
CExpression (const wchar_t *pWcsExpression) | |
virtual | ~CExpression () |
const CResult | Clear () |
const CResult | Assign (const CExpression &rhs) |
const CResult | Assign (const CExpression *pRhs) |
const CResult | SetExpression (const wchar_t *pWcsExpression) |
const wchar_t * | GetExpression () |
Base::CFLString< wchar_t > | GetExpression (bool bExponentialNotation, int32_t i32CoeffPrecision) |
const CResult | Evaluate (wchar_t **ppWcsEvaluatorExpression=nullptr) |
const CResult | Solve (const wchar_t *pWcsVariable, Base::CFLArray< std::complex< double > > *pFlaResult, ECoefficientOrder eCoeffOrder=ECoefficientOrder_Ascending, EAccuracy eAccuracy=EAccuracy_Bits64) |
const CResult | Solve (const wchar_t *pWcsVariable, Base::CFLArray< std::complex< double > > *pFlaResult, Base::CFLArray< std::complex< double > > *pFlaDiscontinuous, ECoefficientOrder eCoeffOrder=ECoefficientOrder_Ascending, EAccuracy eAccuracy=EAccuracy_Bits64) |
const CResult | ExpandExpression (wchar_t **ppWcsEvaluatorExpression=nullptr) |
const CResult | UnrollPower (wchar_t **ppWcsEvaluatorExpression=nullptr) |
const CResult | CollectExpression (wchar_t **ppWcsEvaluatorExpression=nullptr) |
int32_t | GetVariableCount () |
int32_t | GetIndexOfVariable (const wchar_t *pWcsVariableName) |
int32_t | GetIndexOfEvaluatedVariable (const wchar_t *pWcsVariableName) |
const CResult | AssignVariable (int32_t i32Index, double f64Value) |
const CResult | AssignVariable (const wchar_t *pWcsVariableName, double f64Value) |
const CResult | ResetVariable (int32_t i32Index) |
const CResult | ResetVariable (const wchar_t *pWcsVariableName) |
double * | GetVariable (int32_t i32Index) |
double * | GetVariable (const wchar_t *pWcsVariableName) |
const double | GetEvaluatedVariable (int32_t i32Index) |
const double | GetEvaluatedVariable (const wchar_t *pWcsVariableName) |
EExpressionValid | IsExprssionValid () |
![]() | |
CFLBase () | |
Default constructor. | |
virtual | ~CFLBase () |
Destructor. | |
void | Lock () const |
Set a lock on an object. | |
bool | TryLock () const |
Try to lock the object. | |
void | Unlock () const |
Unlock the object. | |
virtual const CProcessingUnitBase * | GetProcessingUnit () const |
Returns the set ProcessingUnit. | |
virtual const CResult | SetProcessingUnit (const CProcessingUnitBase &pub) |
set the ProcessingUnit | |
virtual const CResult | SetProcessingUnit (const CProcessingUnitBase *pPub) |
Set the ProcessingUnit. | |
virtual void | ResetProcessingUnit () |
Rest the ProcessingUnit. | |
virtual bool | IsValid () const |
Validate the object. | |
template<class T > | |
bool | IsValid (T &tValue) const |
Validate input values. | |
template<class T > | |
bool | IsValid (T *pTValue) const |
Validate input values. | |
template<class T > | |
void | GenerateMin (T &tValue) const |
Generate the minimum value of that type. | |
template<class T > | |
void | GenerateMin (T *pTValue) const |
Generate the minimum value of that type. | |
template<class T > | |
void | GenerateMinInt32 (T &tValue) const |
Generate minimum signed 32-bit integer value. | |
template<class T > | |
void | GenerateMinInt32 (T *pTValue) const |
Generate minimum signed 32-bit integer value. | |
template<class T > | |
void | GenerateMinInt31 (T &tValue) const |
Generate minimum signed 31-bit integer value. | |
template<class T > | |
void | GenerateMinInt31 (T *pTValue) const |
Generate minimum signed 31-bit integer value. | |
template<class T > | |
void | GenerateMax (T &tValue) const |
Generate the maximum value of that type. | |
template<class T > | |
void | GenerateMax (T *pTValue) const |
Generate the maximum value of that type. | |
template<class T > | |
void | GenerateMaxInt32 (T &tValue) const |
Generate maximum signed 32-bit integer value. | |
template<class T > | |
void | GenerateMaxInt32 (T *pTValue) const |
Generate maximum signed 32-bit integer value. | |
template<class T > | |
void | GenerateMaxInt31 (T &tValue) const |
Generate maximum signed 31-bit integer value. | |
template<class T > | |
void | GenerateMaxInt31 (T *pTValue) const |
Generate maximum signed 31-bit integer value. | |
template<class T > | |
void | GenerateInvalid (T &tValue) const |
Generate invalid value. | |
template<class T > | |
void | GenerateInvalid (T *pTValue) const |
Generate invalid value. | |
virtual void | OnReceiveBroadcast (const CBroadcastMessage *pMessage) |
Callback function. A function that receives a BroadcastMessage. | |
virtual int64_t | GetClassType () const =0 |
Returns the Type value of Class. The returned value itself has no meaning, but if it is the same type of class, the same value will be displayed, so comparison is possible. | |
const char * | GetClassNameWithNamespace () const |
Returns the class name including the namespace of the actual instance. | |
const char * | GetClassNameWithoutNamespace () const |
Returns the class name that does not include the namespace of the actual instance. | |
virtual uint32_t | GetClassHash () const |
Returns the class hash value of the actual instance. For the same class, even if the instance is different, it has the same value. | |
virtual bool | IsLicenseAvailable () const |
Returns whether the algorithm can be used with the current license. | |
const CResult | ShareSynchronizationObject (const CFLBase *pSrcObject) const |
Share synchronization object of original object. | |
bool | IsSharedSynchronizationObject () const |
Is shared synchronization object. | |
virtual void | Throw (const CResult &res, const wchar_t *pWcsExtraMessage=nullptr) const |
Raise an exception. Information and error codes of the object that occurred are recorded in the log. | |
virtual void | Throw (const std::exception &res, const wchar_t *pWcsExtraMessage) const |
Raise an exception. Information and error codes of the object that occurred are recorded in the log. | |
A class representing expression.
FLImaging::Foundation::CExpression::CExpression | ( | ) |
Default constructor
FLImaging::Foundation::CExpression::CExpression | ( | const CExpression & | rhs | ) |
Copy constructor
[in] | rhs | object to copy |
FLImaging::Foundation::CExpression::CExpression | ( | const CExpression * | pRhs | ) |
Copy constructor
[in] | pRhs | object to copy |
FLImaging::Foundation::CExpression::CExpression | ( | const wchar_t * | pWcsExpression | ) |
Initialization constructor
[in] | pWcsExpression | Set the expression of an object to its string |
|
virtual |
Default destructor
const CResult FLImaging::Foundation::CExpression::Assign | ( | const CExpression & | rhs | ) |
Copy the object.
[in] | rhs | object to copy |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::Assign | ( | const CExpression * | pRhs | ) |
Copy the object.
[in] | pRhs | object to copy |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::AssignVariable | ( | const wchar_t * | pWcsVariableName, |
double | f64Value ) |
Set the value of a variable.
[in] | pWcsVariableName | variable name |
[in] | f64Value | variable value |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::AssignVariable | ( | int32_t | i32Index, |
double | f64Value ) |
Set the value of a variable.
[in] | i32Index | variable index |
[in] | f64Value | variable value |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::Clear | ( | ) |
Initialize the object's variables.
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::CollectExpression | ( | wchar_t ** | ppWcsEvaluatorExpression = nullptr | ) |
Organize the expanded expression by calculating the same terms.
[in] | ppWcsEvaluatorExpression | Organized expression string |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::Evaluate | ( | wchar_t ** | ppWcsEvaluatorExpression = nullptr | ) |
Put the value set in the variable in the expression and calculate it.
[out] | ppWcsEvaluatorExpression | Expression string with values in variables |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::ExpandExpression | ( | wchar_t ** | ppWcsEvaluatorExpression = nullptr | ) |
Expand the expression.
[in] | ppWcsEvaluatorExpression | Expanded expression string |
const | FLImaging::CResult Information about execution results |
const double FLImaging::Foundation::CExpression::GetEvaluatedVariable | ( | const wchar_t * | pWcsVariableName | ) |
Get the value of the calculated variable.
[in] | pWcsVariableName | variable name |
const | double variable value |
const double FLImaging::Foundation::CExpression::GetEvaluatedVariable | ( | int32_t | i32Index | ) |
Get the value of the calculated variable.
[in] | i32Index | variable index number |
const | double variable value |
const wchar_t * FLImaging::Foundation::CExpression::GetExpression | ( | ) |
Get the set expression string.
const | wchar_t* expression string |
Base::CFLString< wchar_t > FLImaging::Foundation::CExpression::GetExpression | ( | bool | bExponentialNotation, |
int32_t | i32CoeffPrecision ) |
The set expression string is imported in the specified format.
[in] | bExponentialNotation | Whether to display in exponential notation, in case of true , the coefficient is expressed as 4.4e-4, and in case of false , the coefficient is expressed as 0.00044 |
[in] | i32CoeffPrecision | Number of decimal places for coefficients to be expressed |
FLImaging::Base::CFLString<wchar_t> | expression string |
int32_t FLImaging::Foundation::CExpression::GetIndexOfEvaluatedVariable | ( | const wchar_t * | pWcsVariableName | ) |
Gets the index of a variable whose value is not set.
[in] | pWcsVariableName | Variable name |
int32_t | index of variable |
int32_t FLImaging::Foundation::CExpression::GetIndexOfVariable | ( | const wchar_t * | pWcsVariableName | ) |
Get the index of the variable whose value is set.
[in] | pWcsVariableName | Variable name |
int32_t | index of variable |
double * FLImaging::Foundation::CExpression::GetVariable | ( | const wchar_t * | pWcsVariableName | ) |
Get the set variable.
[in] | pWcsVariableName | variable name |
double* | Pointer of variable |
double * FLImaging::Foundation::CExpression::GetVariable | ( | int32_t | i32Index | ) |
Get the set variable.
[in] | i32Index | variable index number |
double* | Pointer of variable |
int32_t FLImaging::Foundation::CExpression::GetVariableCount | ( | ) |
Get the number of variables.
int32_t | number of variables |
EExpressionValid FLImaging::Foundation::CExpression::IsExprssionValid | ( | ) |
Determine if a calculated expression is valid
FLImaging::Foundation::CExpression::EExpressionValid | Returns whether a expression is valid |
const CResult FLImaging::Foundation::CExpression::ResetVariable | ( | const wchar_t * | pWcsVariableName | ) |
Reset the variable.
[in] | pWcsVariableName | variable name |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::ResetVariable | ( | int32_t | i32Index | ) |
Reset the variable.
[in] | i32Index | variable index |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::SetExpression | ( | const wchar_t * | pWcsExpression | ) |
Sets the expression string.
[in] | pWcsExpression | Expression string to set |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::Solve | ( | const wchar_t * | pWcsVariable, |
Base::CFLArray< std::complex< double > > * | pFlaResult, | ||
Base::CFLArray< std::complex< double > > * | pFlaDiscontinuous, | ||
ECoefficientOrder | eCoeffOrder = ECoefficientOrder_Ascending, | ||
EAccuracy | eAccuracy = EAccuracy_Bits64 ) |
Calculate the solution of a one-variable equation in a expression. If there is a variable in the denominator, the value of the variable whose denominator is 0 is also returned.
[in] | pWcsVariable | unknown symbol |
[out] | pFlaResult | solution of the equation |
[out] | pFlaDiscontinuous | The value of a variable whose denominator is zero |
[in] | eCoeffOrder | Specifies how the coefficients are arranged in an array |
[in] | eAccuracy | Accuracy of calculation |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::Solve | ( | const wchar_t * | pWcsVariable, |
Base::CFLArray< std::complex< double > > * | pFlaResult, | ||
ECoefficientOrder | eCoeffOrder = ECoefficientOrder_Ascending, | ||
EAccuracy | eAccuracy = EAccuracy_Bits64 ) |
Calculate the solution of a one-variable equation in a expression.
[in] | pWcsVariable | unknown symbol |
[out] | pFlaResult | solution of the equation |
[in] | eCoeffOrder | Specifies how the coefficients are arranged in an array |
[in] | eAccuracy | Accuracy of calculation |
const | FLImaging::CResult Information about execution results |
const CResult FLImaging::Foundation::CExpression::UnrollPower | ( | wchar_t ** | ppWcsEvaluatorExpression = nullptr | ) |
Expands the square expression in the equation into a multiplicative expression.
[in] | ppWcsEvaluatorExpression | Expanded expression string |
const | FLImaging::CResult Information about execution results |