Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
MathUtils::PolyResult Struct Reference

Result for polynomial root finding. Supports up to 4 real roots (for quartic equations). More...

#include <MathUtils_Types.hxx>

Public Member Functions

bool IsDone () const
 Returns true if computation succeeded.
 
 operator bool () const
 Conversion to bool for convenient checking.
 
double operator[] (int theIndex) const
 Access root by index (0-based).
 

Data Fields

MathUtils::Status Status = MathUtils::Status::NotConverged
 Computation status.
 
size_t NbRoots = 0
 Number of real roots found.
 
std::array< double, 4 > Roots = {0.0, 0.0, 0.0, 0.0}
 Array of real roots (sorted)
 

Detailed Description

Result for polynomial root finding. Supports up to 4 real roots (for quartic equations).

Member Function Documentation

◆ IsDone()

bool MathUtils::PolyResult::IsDone ( ) const
inline

Returns true if computation succeeded.

◆ operator bool()

MathUtils::PolyResult::operator bool ( ) const
inlineexplicit

Conversion to bool for convenient checking.

◆ operator[]()

double MathUtils::PolyResult::operator[] ( int theIndex) const
inline

Access root by index (0-based).

Parameters
theIndexroot index (0 to NbRoots-1)
Returns
root value

Field Documentation

◆ NbRoots

size_t MathUtils::PolyResult::NbRoots = 0

Number of real roots found.

◆ Roots

std::array<double, 4> MathUtils::PolyResult::Roots = {0.0, 0.0, 0.0, 0.0}

Array of real roots (sorted)

◆ Status

MathUtils::Status MathUtils::PolyResult::Status = MathUtils::Status::NotConverged

Computation status.


The documentation for this struct was generated from the following file: