Singular https://www.singular.uni-kl.de/forum/ |
|
Storing objects in files https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=1564 |
Page 1 of 1 |
Author: | Guest [ Thu Oct 19, 2006 12:59 am ] |
Post subject: | Storing objects in files |
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! |
Author: | hannes [ Wed Oct 25, 2006 8:26 pm ] |
Post subject: | Re: Soring Objects in Files |
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 |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |