caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michel Quercia <michel.quercia@prepas.org>
To: Winfried Dreckmann <wd@lidingo.mail.telia.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] look operator
Date: Fri, 7 Jun 2002 15:52:50 +0200	[thread overview]
Message-ID: <20020607155250.7b75fdef.michel.quercia@prepas.org> (raw)
In-Reply-To: <B92645D4.B92D%wd@lidingo.mail.telia.com>

Le Fri, 07 Jun 2002 11:13:24 +0200
Winfried Dreckmann <wd@lidingo.mail.telia.com> écrivit :

> Definitely. Actually I was thinking about implementing matrices with
> mutable entries where for efficiency reasons the implementation type of
> entries would be t, and of course implementation details would be hidden
> by the interface. To do this with Numerix one would at least need a
> function
> 
> val set : tref -> t matrix -> int -> int -> unit
> 
> to make matrix entries accessible to in-place operations (with an
> subsequent update to make sure the entries get really changed).

Well, I can easily add such a function, but there remains a few problems
to solve first.

1. Is it okay to have some matrix entry change of value at any time
because we are reusing the tref for some other computation ? Some
machinery could be used to prevent this, for instance clearing the tref
once its value has been "transfered" through a "set" operation.

2. We would need a lot of different "set" functions, one for vectors, one
for matrices, one for each (record type, mutable field) pair that may
happen to be usefull...

3. We can restrict the spread of mutable data to vectors and provide a new
datatype : tvector with its collection of associated functions : vlook,
vadd_in, vmul_in, ...

My preference goes to 3.

Regards,
-- 
Michel Quercia
23 rue de Montchapet, 21000 Dijon
http://michel.quercia.free.fr (maths)
http://pauillac.inria.fr/~quercia (informatique)
mailto:michel.quercia@prepas.org
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-06-07 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-06 10:01 Winfried Dreckmann
2002-06-06 10:58 ` Pixel
2002-06-07  8:02   ` Winfried Dreckmann
2002-06-06 15:08 ` Michel Quercia
2002-06-07  9:13   ` Winfried Dreckmann
2002-06-07 13:52     ` Michel Quercia [this message]
2002-06-08 11:23       ` Winfried Dreckmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020607155250.7b75fdef.michel.quercia@prepas.org \
    --to=michel.quercia@prepas.org \
    --cc=caml-list@inria.fr \
    --cc=wd@lidingo.mail.telia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).