FLImaging 6.5.8.1
FLImaging::Foundation::CEquation Class Reference

A class of Equation calculator. More...

#include <Equation.h>

Inheritance diagram for FLImaging::Foundation::CEquation:
FLImaging::Base::CFLBase

Public Member Functions

 CEquation ()
 
virtual ~CEquation ()
 
- Public Member Functions inherited from FLImaging::Base::CFLBase
 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 CProcessingUnitBaseGetProcessingUnit () 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.
 

Static Public Member Functions

static const CResult Linear (std::complex< double > cpxA, std::complex< double > cpxB, std::complex< double > *pResult, EAccuracy eAccuracy=EAccuracy_Bits64)
 
static const CResult Quadratic (std::complex< double > cpxA, std::complex< double > cpxB, std::complex< double > cpxC, Base::CFLArray< std::complex< double > > *pResult, EAccuracy eAccuracy=EAccuracy_Bits64)
 
static const CResult Cubic (std::complex< double > cpxA, std::complex< double > cpxB, std::complex< double > cpxC, std::complex< double > cpxD, Base::CFLArray< std::complex< double > > *pResult, EAccuracy eAccuracy=EAccuracy_Bits64)
 
static const CResult Quartic (std::complex< double > cpxA, std::complex< double > cpxB, std::complex< double > cpxC, std::complex< double > cpxD, std::complex< double > cpxE, Base::CFLArray< std::complex< double > > *pResult, EAccuracy eAccuracy=EAccuracy_Bits64)
 
static const CResult Solve (const Base::CFLArray< std::complex< double > > &flaCoeffs, Base::CFLArray< std::complex< double > > *pResult, ECoefficientOrder eCoeffOrder=ECoefficientOrder_Ascending, EAccuracy eAccuracy=EAccuracy_Bits64)
 

Detailed Description

A class of Equation calculator.

Constructor & Destructor Documentation

◆ CEquation()

FLImaging::Foundation::CEquation::CEquation ( )

Default constructor

◆ ~CEquation()

virtual FLImaging::Foundation::CEquation::~CEquation ( )
virtual

Default destructor

Member Function Documentation

◆ Cubic()

static const CResult FLImaging::Foundation::CEquation::Cubic ( std::complex< double > cpxA,
std::complex< double > cpxB,
std::complex< double > cpxC,
std::complex< double > cpxD,
Base::CFLArray< std::complex< double > > * pResult,
EAccuracy eAccuracy = EAccuracy_Bits64 )
static

Solve a cubic equation of the form Ax^3 + Bx^2 + Cx + D = 0

Parameters
[in]cpxACoefficients of the cubic term
[in]cpxBCoefficients of the quadratic term
[in]cpxCCoefficients of the linear term
[in]cpxDCoefficients of constant term
[out]pResultSolution of the equation
[in]eAccuracyAccuracy of calcutaion
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult
FLImaging::Base::CFLArray
FLImaging::Foundation::EAccuracy

◆ Linear()

static const CResult FLImaging::Foundation::CEquation::Linear ( std::complex< double > cpxA,
std::complex< double > cpxB,
std::complex< double > * pResult,
EAccuracy eAccuracy = EAccuracy_Bits64 )
static

Solve a linear equation of the form Ax + B= 0

Parameters
[in]cpxACoefficients of the linear term
[in]cpxBCoefficients of constant term
[out]pResultSolution of the equation
[in]eAccuracyAccuracy of calcutaion
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult
FLImaging::Foundation::EAccuracy

◆ Quadratic()

static const CResult FLImaging::Foundation::CEquation::Quadratic ( std::complex< double > cpxA,
std::complex< double > cpxB,
std::complex< double > cpxC,
Base::CFLArray< std::complex< double > > * pResult,
EAccuracy eAccuracy = EAccuracy_Bits64 )
static

Solving quadratic equations of the form Ax^2 + Bx + C = 0

Parameters
[in]cpxACoefficients of the quadratic term
[in]cpxBCoefficients of the linear term
[in]cpxCCoefficients of constant term
[out]pResultSolution of the equation
[in]eAccuracyAccuracy of calcutaion
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult
FLImaging::Base::CFLArray
FLImaging::Foundation::EAccuracy

◆ Quartic()

static const CResult FLImaging::Foundation::CEquation::Quartic ( std::complex< double > cpxA,
std::complex< double > cpxB,
std::complex< double > cpxC,
std::complex< double > cpxD,
std::complex< double > cpxE,
Base::CFLArray< std::complex< double > > * pResult,
EAccuracy eAccuracy = EAccuracy_Bits64 )
static

Solve a quartic equation of the form Ax^4 + Bx^3 + Cx^2 + Dx + E = 0

Parameters
[in]cpxACoefficients of the quartic term
[in]cpxBCoefficients of the cubic term
[in]cpxCCoefficients of the quadratic term
[in]cpxDCoefficients of the linear term
[in]cpxECoefficients of constant term
[out]pResultSolution of the equation
[in]eAccuracyAccuracy of calcutaion
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult
FLImaging::Base::CFLArray
FLImaging::Foundation::EAccuracy

◆ Solve()

static const CResult FLImaging::Foundation::CEquation::Solve ( const Base::CFLArray< std::complex< double > > & flaCoeffs,
Base::CFLArray< std::complex< double > > * pResult,
ECoefficientOrder eCoeffOrder = ECoefficientOrder_Ascending,
EAccuracy eAccuracy = EAccuracy_Bits64 )
static

Solve equations of various degrees

Parameters
[in]flaCoeffsarray of coefficients of each order
[out]pResultSolution of the equation
[out]eCoeffOrderSpecifies how the coefficients are arranged in an array
[in]eAccuracyAccuracy of calcutaion
Return values
constFLImaging::CResult Information about execution results
See also
FLImaging::CResult
FLImaging::Base::CFLArray
FLImaging::Foundation::ECoefficientOrder
FLImaging::Foundation::EAccuracy