igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Saving Graphs


From: Tamas Nepusz
Subject: Re: [igraph] Saving Graphs
Date: Thu, 3 Dec 2009 16:36:11 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

> that's a good idea.
> I'll see if I can, really dumbly, dump a Graph object somewhere inside
> the SQLite file using gml or pickle or whatever else.
Another possibility is Python's shelve module:

http://docs.python.org/library/shelve.html

A Python shelf is essentially a dictionary-like object backed by the
dbm, gdbm or bsddb module (whichever is available), with automatic
pickling and unpickling. Not sure about the performance, though. It may
be useful for you to create a dictionary-like object which acts as an
in-memory LRU cache for your graph objects: it caches, say, the last N
graphs in the memory in their original igraph.Graph form, and if you
need a graph that is not in the cache, it automatically fetches it from
the backing shelf, stores it in the cache and removes the least recently
used graph from the cache.

-- 
Tamas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]