lib

package
v0.0.0-...-8062b39 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const RadiansToMeters = 6371010.0 // 2e+7 / math.Pi

Variables

This section is empty.

Functions

func CobwebDrawToolsString

func CobwebDrawToolsString(result []Portal) string

func DoubleHerringboneDrawToolsString

func DoubleHerringboneDrawToolsString(b0, b1 Portal, result0, result1 []Portal) string

func HerringboneDrawToolsString

func HerringboneDrawToolsString(b0, b1 Portal, result []Portal) string

func HomogeneousDrawToolsString

func HomogeneousDrawToolsString(depth uint16, result []Portal) string

func HomogeneousPolylines

func HomogeneousPolylines(depth uint16, result []Portal) [][]Portal

func LargestDoubleHerringbone

func LargestDoubleHerringbone(portals []Portal, fixedBaseIndices []int, numWorkers int, progressFunc func(int, int)) (Portal, Portal, []Portal, []Portal)

LargestDoubleHerringbone - Find largest possible multilayer of portals to be made

func LargestDoubleHerringboneMT

func LargestDoubleHerringboneMT(portals []Portal, fixedBaseIndices []int, numWorkers int, progressFunc func(int, int)) (Portal, Portal, []Portal, []Portal)

LargestDoubleHerringboneMT - Find largest possible multilayer of portals to be made, parallel version

func LargestDoubleHerringboneST

func LargestDoubleHerringboneST(portals []Portal, fixedBaseIndices []int, progressFunc func(int, int)) (Portal, Portal, []Portal, []Portal)

LargestDoubleHerringboneST - Find largest possible multilayer of portals to be made, using a single thread

func LargestFlipField

func LargestFlipField(portals []Portal, options ...FlipFieldOption) ([]Portal, []Portal)

LargestFlipField -

func LargestFlipFieldMT

func LargestFlipFieldMT(portals []Portal, params flipFieldParams) ([]Portal, []Portal)

func LargestFlipFieldST

func LargestFlipFieldST(portals []Portal, params flipFieldParams) ([]Portal, []Portal)

func LargestHerringbone

func LargestHerringbone(portals []Portal, fixedBaseIndices []int, numWorkers int, progressFunc func(int, int)) (Portal, Portal, []Portal)

LargestHerringbone - Find largest possible multilayer of portals to be made

func LargestHerringboneMT

func LargestHerringboneMT(portals []Portal, fixedBaseIndices []int, numWorkers int, progressFunc func(int, int)) (Portal, Portal, []Portal)

LargestHerringboneMT - Find largest possible multilayer of portals to be made, parallel version

func LargestHerringboneST

func LargestHerringboneST(portals []Portal, fixedBaseIndices []int, progressFunc func(int, int)) (Portal, Portal, []Portal)

LargestHerringboneST - Find largest possible multilayer of portals to be made, using a single thread

func LongestDroneFlight

func LongestDroneFlight(portals []Portal, options ...DroneFlightOption) ([]Portal, []Portal)

func MarkersFromPortalList

func MarkersFromPortalList(portals []Portal) string

func PolylineFromPortalList

func PolylineFromPortalList(portals []Portal) string

func PrintProgressBar

func PrintProgressBar(done int, total int)

func ThreeCornersDrawToolsString

func ThreeCornersDrawToolsString(result []IndexedPortal) string

Types

type AngleQuery

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

func NewAngleQuery

func NewAngleQuery(a, b s2.Point) AngleQuery

func (*AngleQuery) Angle

func (a *AngleQuery) Angle(c s2.Point) s1.Angle

type DroneFlightEndPortalIndex

type DroneFlightEndPortalIndex int

type DroneFlightLeastJumps

type DroneFlightLeastJumps struct{}

type DroneFlightLeastKeys

type DroneFlightLeastKeys struct{}

type DroneFlightNumWorkers

type DroneFlightNumWorkers int

type DroneFlightOption

type DroneFlightOption interface {
	// contains filtered or unexported methods
}

type DroneFlightProgressFunc

type DroneFlightProgressFunc func(int, int)

type DroneFlightStartPortalIndex

type DroneFlightStartPortalIndex int

type DroneFlightUseLongJumps

type DroneFlightUseLongJumps bool

type FlipFieldBackbonePortalLimit

type FlipFieldBackbonePortalLimit struct {
	Value     int
	LimitType PortalLimit
}

type FlipFieldFixedBaseIndices

type FlipFieldFixedBaseIndices []int

type FlipFieldMaxFlipPortals

type FlipFieldMaxFlipPortals int

type FlipFieldNumWorkers

type FlipFieldNumWorkers int

type FlipFieldOption

type FlipFieldOption interface {
	// contains filtered or unexported methods
}

type FlipFieldProgressFunc

type FlipFieldProgressFunc func(int, int)

type FlipFieldSimpleBackbone

type FlipFieldSimpleBackbone bool

type HomogeneousClumpTogether

type HomogeneousClumpTogether struct{}

type HomogeneousDisabledPortals

type HomogeneousDisabledPortals []Portal

type HomogeneousFixedCornerIndices

type HomogeneousFixedCornerIndices []int

type HomogeneousLargestArea

type HomogeneousLargestArea struct{}

type HomogeneousMaxDepth

type HomogeneousMaxDepth int

type HomogeneousMostEquilateralTriangle

type HomogeneousMostEquilateralTriangle struct{}

type HomogeneousNumWorkers

type HomogeneousNumWorkers int

type HomogeneousOption

type HomogeneousOption interface {
	// contains filtered or unexported methods
}

type HomogeneousProgressFunc

type HomogeneousProgressFunc func(int, int)

type HomogeneousPure

type HomogeneousPure bool

type HomogeneousRandom

type HomogeneousRandom struct {
	Rand *rand.Rand
}

type HomogeneousSmallestArea

type HomogeneousSmallestArea struct{}

type HomogeneousSpreadAround

type HomogeneousSpreadAround struct{}

type IndexedPortal

type IndexedPortal struct {
	Portal Portal
	Index  int
}

IndexedPortal - Portal plus a number

func LargestThreeCorner

func LargestThreeCorner(portals0, portals1, portals2 []Portal, progressFunc func(int, int)) []IndexedPortal

LargestThreeCorner - Find best way to connect three groups of portals

type Portal

type Portal struct {
	Guid   string
	Name   string
	LatLng s2.LatLng
}

Portal - portal with geographic coordinates in s2.Point format

func AppendHomogeneousPolylines

func AppendHomogeneousPolylines(p0, p1, p2 Portal, maxDepth uint16, result [][]Portal, portals []Portal) ([][]Portal, []Portal)

func CobwebPolyline

func CobwebPolyline(result []Portal) []Portal

func DeepestHomogeneous

func DeepestHomogeneous(portals []Portal, options ...HomogeneousOption) ([]Portal, uint16)

DeepestHomogeneous - Find deepest homogeneous field that can be made out of portals

func DoubleHerringbonePolyline

func DoubleHerringbonePolyline(b0, b1 Portal, result0, result1 []Portal) []Portal

func HerringbonePolyline

func HerringbonePolyline(b0, b1 Portal, result []Portal) []Portal

func LargestCobweb

func LargestCobweb(portals []Portal, fixedCornerIndices []int, progressFunc func(int, int)) []Portal

LargestCobweb - Find largest possible cobweb of portals to be made

func ParseFile

func ParseFile(filename string) ([]Portal, error)

ParseFile parses file to portal list.

It tries to guess the file format based on extensions of the file.

func ThreeCornersPolyline

func ThreeCornersPolyline(result []IndexedPortal) []Portal

type PortalCoordinates

type PortalCoordinates struct {
	Lat string `json:"lat"`
	Lng string `json:"lng"`
}

PortalCoordinates - portal coordinates in textual format

type PortalInfo

type PortalInfo struct {
	Guid        string            `json:"guid"`
	Name        string            `json:"title"`
	Coordinates PortalCoordinates `json:"coordinates"`
}

PortalInfo - portal with geographic coordinated in textual format

type PortalLimit

type PortalLimit int
const (
	EQUAL      PortalLimit = 0
	LESS_EQUAL PortalLimit = 1
)

Jump to

Keyboard shortcuts

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