Macaulay2 » Documentation
Packages » NAGtypes :: solutionsWithMultiplicity
next | previous | forward | backward | up | index | toc

solutionsWithMultiplicity -- replaces clusters of approximately equal points by single points with multiplicity

Synopsis

Description

Clusters the points and outputs a list with one point p per cluster with p.Multiplicity equal to the size of the cluster. If the multiplicity is not 1, then p.SolutionStatus is set to Singular; otherwise, it is inherited from one of the points in the cluster.

Whether two points are approximately equal is decided by the function areEqual that depends on Tolerance.

i1 : a = point {{0,1}}

o1 = a

o1 : Point
i2 : b = point {{0.000000001,1+0.00000000001*ii}}

o2 = b

o2 : Point
i3 : c = point {{0.001*ii,1}}

o3 = c

o3 : Point
i4 : M = solutionsWithMultiplicity {a,b,c}

o4 = {a, c}

o4 : List
i5 : peek M

o5 = {Point{cache => CacheTable{...1...}},
            Coordinates => {0, 1}         
     ------------------------------------------------------------------------
     Point{cache => CacheTable{...1...}}}
           Coordinates => {.001*ii, 1}

Caveat

A point in a cluster may be farther than Tolerance from another point in the cluster. (In that case there has to be another point in the cluster that is within the Tolerance.)

Ways to use solutionsWithMultiplicity :

For the programmer

The object solutionsWithMultiplicity is a method function with options.