MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MathLink and lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33125] Re: MathLink and lists
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 4 Mar 2002 06:04:00 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <a5nrn6$rcl$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

you can't do that. Because Mathematica copy lists very often
and a single copy operation will bring the full data set into your
memory. So you can't "make Mathematica think that it is a list".

In one of the Mathematica Programmer books by Roman Maeder is
an implementation of "infinite long" lists. This coed may
help you to make the MathLink functions for your problem.

Regards
  Jens

Adam Lyon wrote:
> 
> Hi,
> 
> I have a perhaps advanced MathLink question. Here's what I want to do:
> 
> I want to have an object in Mathematica that Mathematica thinks is a
> list. But in reality, whenever Mathematica wants to get an element of
> the list it calls a MathLink function that retrieves the value.
> 
> The idea here is to access a very large dataset (so large that I don't
> want to have to *copy* it to a real Mathematica list) accessable from
> Mathematica using all of the nice list functions (like ListPlot). I can
> write a C program that can randomly access and iterate over the dataset
> quickly, so it would seem to make sense for Mathematica to use my C
> program instead of holding the large dataset in its own memory.
> 
> I've done extensive searching of mathematica web sites and newsgroups
> and haven't seen anything about doing something like this. Anyone have
> any ideas? Much thanks.
> 
> --- Adam
> 
> Adam Lyon / Univ. of Rochester Group at CLEO
> Wilson Synchrotron Lab (Cornell University, Ithaca, NY)


  • Prev by Date: Re: batch mode and front end
  • Next by Date: RE: Plotting from a file
  • Previous by thread: MathLink and lists
  • Next by thread: Re: Large Files