next | previous | forward | backward | up | index | toc

# curveClassRepresentativeM0nbar(ZZ,HashTable) -- creates an object of type CurveClassRepresentativeM0nbar

## Description

This function creates an object of type CurveClassRepresentativeM0nbar from a hash table. Here is a basic example:

 i1 : H1=new HashTable from { {{{1,2},{3},{4},{5}},1}, {{{1,3},{2},{4},{5}},1} }; i2 : curveClassRepresentativeM0nbar(5,H1) o2 = CurveClassRepresentativeM0nbar{"CurveExpression" => HashTable{{{1, 2}, {3}, {4}, {5}} => 1}} {{1, 3}, {2}, {4}, {5}} => 1 "NumberOfMarkedPoints" => 5 o2 : CurveClassRepresentativeM0nbar

Warning: when you enter a hash table in Macaulay2, if you use a key more than once, the first instance is discarded. Here is an example where the behavior may differ from what you want:

 i3 : H=new HashTable from { {{{1,2},{3},{4},{5}},1}, {{{1,3},{2},{4},{5}},1}, {{{1,2},{3},{4},{5}},2}} o3 = HashTable{{{1, 2}, {3}, {4}, {5}} => 2} {{1, 3}, {2}, {4}, {5}} => 1 o3 : HashTable

The user probably wanted $F_{\{1,2\},\{3\},\{4\},\{5\}} + 2F_{\{1,2\},\{3\},\{4\},\{5\}}$ to give $3F_{\{1,2\},\{3\},\{4\},\{5\}}$ instead. So if your expression has two terms that are written exactly alike, you could either combine them before you create the input hash table, or input a list instead.

 i4 : L= { {{{1,2},{3},{4},{5}},1}, {{{1,3},{2},{4},{5}},1}, {{{1,2},{3},{4},{5}},2}} o4 = {{{{1, 2}, {3}, {4}, {5}}, 1}, {{{1, 3}, {2}, {4}, {5}}, 1}, {{{1, 2}, ------------------------------------------------------------------------ {3}, {4}, {5}}, 2}} o4 : List i5 : curveClassRepresentativeM0nbar(5,L) o5 = CurveClassRepresentativeM0nbar{"CurveExpression" => HashTable{{{1, 2}, {3}, {4}, {5}} => 3}} {{1, 3}, {2}, {4}, {5}} => 1 "NumberOfMarkedPoints" => 5 o5 : CurveClassRepresentativeM0nbar

For this reason, most users will probably prefer to enter curves via lists, rather than hash tables.

The function curveClassRepresentative does the same minimal testing if you enter a hash table that it does if you enter a list. See the documentation for curveClassRepresentativeM0nbar(ZZ,List).