Hi,
Since minuit does not provide lagrange multiplier interface [a] there are two other ways to apply your a contraint:
E.g., add
par[newPar]*(par[1]+par[2]-1)**2 to chisq (or whatever) ...
Setting |par[newPar]| big will enforce constraint to a very good approximation.
-Art S.
[a] It can't because it's a minimizer and the lagrange formulation is at saddle point in the lagrange multipliers.
A.E. Snyder, Group EC \!c*p?/ SLAC Mail Stop #95 ((. .)) Box 4349 | Stanford, Ca, USA, 94309 '\|/` e-mail:snyder_at_slac.stanford.edu o phone:650-926-2701 _ http://www.slac.stanford.edu/~snyder BaBar FAX:650-926-2657 Collaboration
On Wed, 29 Oct 2008, Patrick Dupre wrote:
> Hello,
>
> I am uisng minuit2 and FunctionMinimum.
> To define my function I use the operator ()
> but it is a virtual method:
> double operator () (const std::vector<double>&) const ;
> and I cannot modify the parameter inside this method, whilst I need
> to put a constrain to some of them.
> For example par [1] = 1 - par [2].
> I let par [1] be variable and fix par [2].
> How can I put a constrain on some parameters ?
>
> Thank.
>
> --
> ---
> ==========================================================================
> Patrick DUPRÉ | |
> Department of Chemistry | | Phone: (44)-(0)-1904-434384
> The University of York | | Fax: (44)-(0)-1904-432516
> Heslington | |
> York YO10 5DD United Kingdom | | email: pd520_at_york.ac.uk
> ==========================================================================
Received on Wed Oct 29 2008 - 02:07:18 CET
This archive was generated by hypermail 2.2.0 : Thu Oct 30 2008 - 17:50:02 CET