Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Storing objects in files
PostPosted: Thu Oct 19, 2006 12:59 am 
Hi all,

Is there a nice way to store the data for a resolution in a file, so that it can be easily retrieved? For example, if I create a resolution and use the "write" command to store its contents, a flat list of all the syzygies from *every* map in the resolution is stored. For example,
Code:
> ring R=0,(x,y,z,w),dp;
> ideal I=xz-y2,xw-yz,yw-z2;
> resolution II=mres(I,0);
> write("test.singular",II);
> string s=read("test.singular");
> s;
z2-yw,yz-xw,y2-xz,y*gen(1)-z*gen(2)+w*gen(3),x*gen(1)-y*gen(2)+z*gen(3),0,gen(1)


I suppose I could write a for loop and store all the maps separately, but is there a better way to store a resolution in a file for later use?

Incidentally, why is there a "gen(1)" at the end of the list above? It seems any loop which iterates through the maps in a resolution would have to remember to ignore this "gen(1)".

Thanks for writing such an amazing program!


Report this post
Top
  
Reply with quote  
 Post subject: Re: Soring Objects in Files
PostPosted: Wed Oct 25, 2006 8:26 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
The representation of an object in a file depends on the type of the link.
In a file described by an ASCII link (the default),
everything is written in its string representation.
A more efficient way is provided by MP links, which unfortunatly
do not support the type resolution (not yet implemented).
But you can write the matrices representing the resolution
to a MP link by a loop.
(see http://www.singular.uni-kl.de/Manual/3-0-2/sing_98.htm)

Hans Schoenemann, Singular Team


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

It is currently Fri May 13, 2022 11:03 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group