list

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Elementer

type Elementer interface {
	list.Elementer
}

type ElementerPointer

type ElementerPointer interface {
	list.Elementer
	maths.Pointer
}

type List

type List struct {
	list.List
}

func New

func New() *List

func (*List) ForEach

func (l *List) ForEach(fn func(ElementerPointer) bool)

ForEachIdx is the same as the one in singlelist except it takes ElementerPointers

func (*List) ForEachIdx

func (l *List) ForEachIdx(fn func(int, ElementerPointer) bool)

ForEachIdx is the same as the one in singlelist except it takes ElementerPointers

func (*List) ForEachPt

func (l *List) ForEachPt(fn func(int, maths.Pt) bool)

ForEachPt will iterate forward through the list. The fn will be called for each pt. If fn returns false, the iteration will stop.

func (*List) ForEachPtBetween

func (l *List) ForEachPtBetween(start, end ElementerPointer, fn func(int, maths.Pt) bool)

ForEachPtBetween will iterate forward through the list. Starting from the start point to the end point calling the fn.

func (*List) GoString

func (l *List) GoString() string

func (*List) PushInBetween

func (l *List) PushInBetween(start, end ElementerPointer, element ElementerPointer) (r bool)

PushInBetween will Push the element pointer between the start and end points

type Pt

type Pt struct {
	maths.Pt
	// This fulfills the Elementer interface.
	list.Sentinel
}

Pt is a point node.

func NewPoint

func NewPoint(x, y float64) *Pt

func NewPointSlice

func NewPointSlice(pts ...maths.Pt) (rpts []*Pt)

func NewPt

func NewPt(pt maths.Pt) *Pt

func (*Pt) GoString

func (p *Pt) GoString() string

func (*Pt) Point

func (p *Pt) Point() (pt maths.Pt)

func (*Pt) String

func (p *Pt) String() string

Jump to

Keyboard shortcuts

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