From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14592 invoked by alias); 8 Jul 2009 10:54:27 -0000 Received: (qmail 14583 invoked by uid 22791); 8 Jul 2009 10:54:27 -0000 X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=BAYES_40 X-Spam-Check-By: sourceware.org Received: from mx1.cs.umb.edu (HELO mx1.cs.umb.edu) (158.121.104.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jul 2009 10:54:19 +0000 Received: from blade71.cs.umb.edu (blade71.cs.umb.edu [192.168.105.81]) by mx1.cs.umb.edu (8.12.11/8.12.8) with ESMTP id n68AsH62001893 for ; Wed, 8 Jul 2009 06:54:17 -0400 (EDT) Received: from localhost (sj@localhost) by blade71.cs.umb.edu (8.8.8/8.8.8) with ESMTP id GAA16284 for ; Wed, 8 Jul 2009 06:54:17 -0400 (EDT) Date: Wed, 08 Jul 2009 10:54:00 -0000 From: Szymon Jaroszewicz To: gsl-discuss@sourceware.org Subject: Monte Carlo API problem Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00001.txt.bz2 Hi, I was wrapping monte carlo routines in Python in ctypesGSL and hit an API problem esp. in Vegas. The gsl_monte_vegas_state structure has several public fields which can be changed to modify the algorithm. However to make these fields available in Python through ctypes I would need to wrap several private members of the structure - quite unelegant. The situation is somewhat better in Miser where all public fields are at the beginning of the structure and private fields can simply be skipped. Should the API be updated to allow setting at least some of the parameters without messing with state fields directly? At the minimum I think there should be a way to get the chisq field for Vegas which is used to test convergence. -- Szymon