Macaulay2 » Documentation
Packages » SpecialFanoFourfolds :: localExamplesArchive
next | previous | forward | backward | up | index | toc

localExamplesArchive -- access and manage the local examples archive

Description

This function returns an object representing the local archive of stored fourfold examples. Examples are typically added to the archive with store and retrieved with example. Examples are stored in the directory 'applicationDirectory/SpecialFanoFourfoldsExamples/'. When displayed, the object provides an overview of the examples currently available and those already loaded in memory.

The local examples archive may be cleared with clean localExamplesArchive(). All examples currently available in the local examples archive may be exported to a timestamped .tar.gz archive with export localExamplesArchive(). Such an archive may later be imported with importFrom(archive,localExamplesArchive()).

If archive is a URL, then importFrom(archive,localExamplesArchive()) first downloads the archive and then imports it. To import examples directly from the author's GitHub repository, use importFrom("@",localExamplesArchive()).

By default, importing an archive replaces the current contents of the local examples archive. To safely import an archive only if no existing example would be overwritten, use importFrom(archive,localExamplesArchive(),KeepFiles=>true).

Examples may be removed from the local archive with delete(X,localExamplesArchive()), delete(name,n,localExamplesArchive()), or delete(n,localExamplesArchive()). The latter deletes all examples of fourfold type n.

i1 : A = localExamplesArchive()

o1 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 0 (loaded: 0)
-- More info: ? oo
i2 : clean A
-- local examples archive cleared

o2 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 0 (loaded: 0)
-- More info: ? oo
i3 : X = cubicFourfold "quartic scroll";

o3 : ProjectiveVariety, cubic fourfold
i4 : scan(4,i -> store(X,i)) -- storing four copies of X with numeric names
-- example "0" successfully stored
-- example "1" successfully stored
-- example "2" successfully stored
-- example "3" successfully stored
i5 : A

o5 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 4 (loaded: 0)
-- example(ϑ,1), ϑ ∈ {0,...,3}
-- More info: ? oo
i6 : (X1,X2,X3) = (example 1,example 2,example 3); -- loading some of the examples
-- loading example("1",1)...
-- evaluating example("1",1)...
-- example("1",1) ready.
-- loading example("2",1)...
-- evaluating example("2",1)...
-- example("2",1) ready.
-- loading example("3",1)...
-- evaluating example("3",1)...
-- example("3",1) ready.
i7 : A

o7 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 4 (loaded: 3)
-- example(ϑ,1), ϑ ∈ {0,...,3} (loaded: ϑ ∈ {1,...,3})
-- More info: ? oo
i8 : store X2 -- updating a loaded example
-- example "2" successfully overwritten

o8 = 2
i9 : name = store specialFourfold(surface((4,6,1),(1,2,0)));
-- example "dscf_a" successfully stored
i10 : A

o10 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 5 (loaded: 2)
-- example(ϑ,0), ϑ ∈ {dscf_a}
-- example(ϑ,1), ϑ ∈ {0,...,3} (loaded: ϑ ∈ {1, 3})
-- More info: ? oo
i11 : Y = example(name,Verbose=>false); -- loading another example

o11 : ProjectiveVariety, cubic fourfold in C_12 ∩ C_8
i12 : A

o12 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 5 (loaded: 3)
-- example(ϑ,0), ϑ ∈ {dscf_a} (loaded: ϑ ∈ {dscf_a})
-- example(ϑ,1), ϑ ∈ {0,...,3} (loaded: ϑ ∈ {1, 3})
-- More info: ? oo
i13 : archive = export A
-- examples archive successfully exported to "/tmp/M2-31709-0/10-rundir/ExamplesSFF_2026-11-26_04-23.tar.gz"

o13 = ExamplesSFF_2026-11-26_04-23
i14 : delete(X2,A) -- deleting a loaded example
-- warning: example("2",1) was not present in the cache of example
-- example("2",1) deleted

o14 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 4 (loaded: 3)
-- example(ϑ,0), ϑ ∈ {dscf_a} (loaded: ϑ ∈ {dscf_a})
-- example(ϑ,1), ϑ ∈ {0, 1, 3} (loaded: ϑ ∈ {1, 3})
-- More info: ? oo
i15 : importFrom(archive,A)
-- local examples archive cleared
-- examples archive successfully imported

-- ----------------------------------------
-- Hodge-special fourfold examples archive.
-- Created: 2026-11-26
-- ----------------------------------------

o15 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 5 (loaded: 0)
-- example(ϑ,0), ϑ ∈ {dscf_a}
-- example(ϑ,1), ϑ ∈ {0,...,3}
-- More info: ? oo
i16 : clean A
-- local examples archive cleared

o16 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 0 (loaded: 0)
-- More info: ? oo
i17 : importFrom(archive,A,KeepFiles=>true)
-- examples archive successfully merged

o17 : Local examples archive of Hodge-special fourfolds
-- Number of examples: 5 (loaded: 0)
-- example(ϑ,0), ϑ ∈ {dscf_a}
-- example(ϑ,1), ϑ ∈ {0,...,3}
-- More info: ? oo

See also

For the programmer

The object localExamplesArchive is a function closure.


The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/SpecialFanoFourfolds/docs.m2:604:0.