forum.alglib.net
http://forum.alglib.net/

multiple conflicting definitions of nleqstate
http://forum.alglib.net/viewtopic.php?f=2&t=411
Page 1 of 1

Author:  kamogs [ Mon Aug 15, 2011 8:45 pm ]
Post subject:  multiple conflicting definitions of nleqstate

There are two different definitions of nleqstate, one in namespace alglib_impl, and another in namespace alglib.
nleqcreatelm uses first definition, while nleqsolve uses second definition.
Per documentation,
1. User initializes algorithm state with NLEQCreateLM() call
2. User tunes solver parameters with NLEQSetCond(), NLEQSetStpMax() and
other functions
3. User calls NLEQSolve() function which takes algorithm state and
pointers (delegates, etc.) to callback functions which calculate merit
function value and Jacobian.

How, algorithm state can be passed from nleqcreatelm to nleqsolve, when they use different state structures?

Author:  Sergey.Bochkanov [ Tue Aug 16, 2011 7:40 pm ]
Post subject:  Re: multiple conflicting definitions of nleqstate

There are no multiple definitions, because there are two different definitions (although with same name) from two different namespaces:
* alglib_impl::nleqstate, low-level structure which handles all implementation details
* alglib::nleqstate, high-level wrapper around alglib_impl::nleqstate

Every interface function from ALGLIB has two implementations: one from alglib namespace (front-end) and another one from alglib_impl namespace (actual implementation). You've accidentally found alglib_impl::nleqcreatelm instead of alglib::nleqcreatelm - that's why you've decided that nleqcreatelm and nleqsolve use different structures.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/