-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sophisticated show method for toric divisors
- Loading branch information
1 parent
b699ba8
commit 4c28072
Showing
7 changed files
with
140 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
function output_string(td::ToricDivisor) | ||
|
||
# initiate the output string | ||
out_string = "A torus invariant" | ||
|
||
# cartier? | ||
if has_attribute(td, :iscartier) | ||
if get_attribute(td, :iscartier) | ||
out_string = out_string * " cartier,"; | ||
else | ||
if has_attribute(td, :isq_cartier) | ||
if get_attribute(td, :isq_cartier) | ||
out_string = out_string * " q-cartier,"; | ||
else | ||
out_string = out_string * " non-q-cartier,"; | ||
end | ||
else | ||
out_string = out_string * " non-cartier,"; | ||
end | ||
end | ||
end | ||
|
||
# principal? | ||
if has_attribute(td, :isprincipal) | ||
if get_attribute(td, :isprincipal) | ||
out_string = out_string * " principal,"; | ||
else | ||
out_string = out_string * " non-principal,"; | ||
end | ||
end | ||
|
||
# basepoint free? | ||
if has_attribute(td, :isbasepoint_free) | ||
if get_attribute(td, :isbasepoint_free) | ||
out_string = out_string * " basepoint-free,"; | ||
else | ||
out_string = out_string * " non-basepoint-free,"; | ||
end | ||
end | ||
|
||
# effective? | ||
if has_attribute(td, :iseffective) | ||
if get_attribute(td, :iseffective) | ||
out_string = out_string * " effective,"; | ||
else | ||
out_string = out_string * " non-effective,"; | ||
end | ||
end | ||
|
||
# integral? | ||
if has_attribute(td, :isintegral) | ||
if get_attribute(td, :isintegral) | ||
out_string = out_string * " integral,"; | ||
else | ||
out_string = out_string * " non-integral,"; | ||
end | ||
end | ||
|
||
# (very) ample? | ||
if has_attribute(td, :isample) | ||
if get_attribute(td, :isample) | ||
out_string = out_string * " ample,"; | ||
else | ||
if has_attribute(td, :isvery_ample) | ||
if get_attribute(td, :isvery_ample) | ||
out_string = out_string * " very-ample,"; | ||
else | ||
out_string = out_string * " non-very-ample,"; | ||
end | ||
else | ||
out_string = out_string * " non-ample,"; | ||
end | ||
end | ||
end | ||
|
||
# nef? | ||
if has_attribute(td, :isnef) | ||
if get_attribute(td, :isnef) | ||
out_string = out_string * " nef,"; | ||
else | ||
out_string = out_string * " non-nef,"; | ||
end | ||
end | ||
|
||
# prime divisor? | ||
if has_attribute(td, :isprime_divisor) | ||
if get_attribute(td, :isprime_divisor) | ||
out_string = out_string * " prime"; | ||
else | ||
out_string = out_string * " non-prime"; | ||
end | ||
end | ||
|
||
# torusfactor? | ||
if last(out_string) == ',' | ||
out_string = chop(out_string) | ||
end | ||
out_string = out_string * " divisor on a" * chop(output_string(toricvariety(td)), head = 1, tail = 0) | ||
|
||
# return result | ||
return out_string | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters