Rhino C++ API  8.14
Public Member Functions | Public Attributes | List of all members
ON_LocalZero1 Class Referenceabstract

find a local zero of a 1 parameter function More...

#include <opennurbs_optimize.h>

Public Member Functions

 ON_LocalZero1 ()
 
virtual ~ON_LocalZero1 ()
 
virtual bool Evaluate (double, double *, double *, int)=0
 
bool FindZero (double *)
 

Public Attributes

double m_f_tolerance
 
const double * m_k
 
int m_k_count
 length of m_k[] array ( 0 or >= 2 ). More...
 
double m_t0
 
double m_t1
 
double m_t_tolerance
 

Detailed Description

find a local zero of a 1 parameter function

Constructor & Destructor Documentation

◆ ON_LocalZero1()

ON_LocalZero1::ON_LocalZero1 ( )

◆ ~ON_LocalZero1()

virtual ON_LocalZero1::~ON_LocalZero1 ( )
virtual

Member Function Documentation

◆ Evaluate()

virtual bool ON_LocalZero1::Evaluate ( double  ,
double *  ,
double *  ,
int   
)
pure virtual

◆ FindZero()

bool ON_LocalZero1::FindZero ( double *  )

Searches domain between m_t0 and m_t1 domain for a root. Returns true if a root is found.

Member Data Documentation

◆ m_f_tolerance

double ON_LocalZero1::m_f_tolerance

(>= 0.0) If this value is > 0.0, then the search is terminated when a parameter "t" is found where |f(t)| <= m_f_tolerance.

◆ m_k

const double* ON_LocalZero1::m_k

m_k[] is either nullptr or monotone increasing array of length m_k_count.

This zero finder works on continuous piecewise c2 functions. If the function is c2 on the interior of the domain

     [min(t0,t1), max(m_t0,m_t1)]

then there is no need to initialize m_k[]. If the function is not c2 on the domain in question, then the m_k[m_count] array is a list of parameters that define the c2 domains. When m_k[] is not nullptr, m_count must be >= 2 and m_k[] must be monotone increasing and satisfy

     m_k[0] <= min(m_t0,m_t1) 
     and
     m_k[m_count-1] >= max(m_t0,m_t1).

Duplicate values in m_k[] are permitted so that NURBS knot vector arrays may be used directly.

◆ m_k_count

int ON_LocalZero1::m_k_count

length of m_k[] array ( 0 or >= 2 ).

◆ m_t0

double ON_LocalZero1::m_t0

m_t0 and m_t1 specify the domain to search and must satisfy

     1) m_t0 != m_t1
     2) f(m_t0) and f(m_t1) must have different signs
        or one must have absolute value <= m_f_tolerance 

◆ m_t1

double ON_LocalZero1::m_t1

◆ m_t_tolerance

double ON_LocalZero1::m_t_tolerance

(>= 0.0) If this value is > 0.0, then the search is terminated when a parameter the root is bracketed in a domain with width <= m_t_tolerance.