singularity

package
v0.1.2-0...-50d33d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreEqual

func AreEqual(p *Point, q *Point) bool

AreEqual returns true iff the two arguments are the same singularity.

Types

type Point

type Point struct {
	// contains filtered or unexported fields
}

Point represents a singularity.

func FromString

func FromString(s string) (*Point, error)

FromString converts strings like "[r,a]" to a singularity

func New

func New(r int, a int) (*Point, error)

New makes the singularity 1/r(1,a,r-a), replacing a by its least residue mod r, and switching a and r-a if necessary so a is the smaller of the two.

func (*Point) Index

func (p *Point) Index() int

Index returns the index of the singularity

func (*Point) Less

func (p *Point) Less(q *Point) bool

Less returns true iff p = [r,a] < q = [s,b] in the sense r<s or = and a<b

func (*Point) Polarisation

func (p *Point) Polarisation() int

Polarisation returns the polarisation of the singularity

func (*Point) Scan

func (p *Point) Scan(src interface{}) error

Scan

func (*Point) String

func (p *Point) String() string

String represents a singularity as a string (as an int slice)

func (*Point) Value

func (p *Point) Value() (driver.Value, error)

Value

type PointSlice

type PointSlice []*Point

PointSlice

func PointSliceFromString

func PointSliceFromString(s string) (PointSlice, error)

PointSliceFromString returns a point slice

func (PointSlice) Len

func (B PointSlice) Len() int

Len returns the length of the PointSlice B

func (PointSlice) Less

func (B PointSlice) Less(i int, j int) bool

Less returns true iff the ith point of B is less than the jth point of B (in the sense of singularities)

func (PointSlice) String

func (b PointSlice) String() string

String returns a point slice as a string

func (PointSlice) Swap

func (B PointSlice) Swap(i int, j int)

Swap exchanges ith and jth entries of PointSlice B

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL