Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Storing objects in files
Author Message
  Post subject:  Re: Soring Objects in Files  Reply with quote
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
Post Posted: Wed Oct 25, 2006 8:26 pm
  Post subject:  Storing objects in files  Reply with quote
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!
Post Posted: Thu Oct 19, 2006 12:59 am


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