Documentation ¶
Index ¶
- Constants
- func CobwebDrawToolsString(result []Portal) string
- func DoubleHerringboneDrawToolsString(b0, b1 Portal, result0, result1 []Portal) string
- func HerringboneDrawToolsString(b0, b1 Portal, result []Portal) string
- func HomogeneousDrawToolsString(depth uint16, result []Portal) string
- func HomogeneousPolylines(depth uint16, result []Portal) [][]Portal
- func LargestDoubleHerringbone(portals []Portal, fixedBaseIndices []int, numWorkers int, ...) (Portal, Portal, []Portal, []Portal)
- func LargestDoubleHerringboneMT(portals []Portal, fixedBaseIndices []int, numWorkers int, ...) (Portal, Portal, []Portal, []Portal)
- func LargestDoubleHerringboneST(portals []Portal, fixedBaseIndices []int, progressFunc func(int, int)) (Portal, Portal, []Portal, []Portal)
- func LargestFlipField(portals []Portal, options ...FlipFieldOption) ([]Portal, []Portal)
- func LargestFlipFieldMT(portals []Portal, params flipFieldParams) ([]Portal, []Portal)
- func LargestFlipFieldST(portals []Portal, params flipFieldParams) ([]Portal, []Portal)
- func LargestHerringbone(portals []Portal, fixedBaseIndices []int, numWorkers int, ...) (Portal, Portal, []Portal)
- func LargestHerringboneMT(portals []Portal, fixedBaseIndices []int, numWorkers int, ...) (Portal, Portal, []Portal)
- func LargestHerringboneST(portals []Portal, fixedBaseIndices []int, progressFunc func(int, int)) (Portal, Portal, []Portal)
- func LongestDroneFlight(portals []Portal, options ...DroneFlightOption) ([]Portal, []Portal)
- func MarkersFromPortalList(portals []Portal) string
- func PolylineFromPortalList(portals []Portal) string
- func PrintProgressBar(done int, total int)
- func ThreeCornersDrawToolsString(result []IndexedPortal) string
- type AngleQuery
- type DroneFlightEndPortalIndex
- type DroneFlightLeastJumps
- type DroneFlightLeastKeys
- type DroneFlightNumWorkers
- type DroneFlightOption
- type DroneFlightProgressFunc
- type DroneFlightStartPortalIndex
- type DroneFlightUseLongJumps
- type FlipFieldBackbonePortalLimit
- type FlipFieldFixedBaseIndices
- type FlipFieldMaxFlipPortals
- type FlipFieldNumWorkers
- type FlipFieldOption
- type FlipFieldProgressFunc
- type FlipFieldSimpleBackbone
- type HomogeneousClumpTogether
- type HomogeneousDisabledPortals
- type HomogeneousFixedCornerIndices
- type HomogeneousLargestArea
- type HomogeneousMaxDepth
- type HomogeneousMostEquilateralTriangle
- type HomogeneousNumWorkers
- type HomogeneousOption
- type HomogeneousProgressFunc
- type HomogeneousPure
- type HomogeneousRandom
- type HomogeneousSmallestArea
- type HomogeneousSpreadAround
- type IndexedPortal
- type Portal
- func AppendHomogeneousPolylines(p0, p1, p2 Portal, maxDepth uint16, result [][]Portal, portals []Portal) ([][]Portal, []Portal)
- func CobwebPolyline(result []Portal) []Portal
- func DeepestHomogeneous(portals []Portal, options ...HomogeneousOption) ([]Portal, uint16)
- func DoubleHerringbonePolyline(b0, b1 Portal, result0, result1 []Portal) []Portal
- func HerringbonePolyline(b0, b1 Portal, result []Portal) []Portal
- func LargestCobweb(portals []Portal, fixedCornerIndices []int, progressFunc func(int, int)) []Portal
- func ParseFile(filename string) ([]Portal, error)
- func ThreeCornersPolyline(result []IndexedPortal) []Portal
- type PortalCoordinates
- type PortalInfo
- type PortalLimit
Constants ¶
const RadiansToMeters = 6371010.0 // 2e+7 / math.Pi
Variables ¶
This section is empty.
Functions ¶
func CobwebDrawToolsString ¶
func HomogeneousPolylines ¶
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 LargestFlipFieldST ¶
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 PolylineFromPortalList ¶
func PrintProgressBar ¶
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
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 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 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 HomogeneousPure ¶
type HomogeneousPure bool
type HomogeneousRandom ¶
type HomogeneousSmallestArea ¶
type HomogeneousSmallestArea struct{}
type HomogeneousSpreadAround ¶
type HomogeneousSpreadAround struct{}
type IndexedPortal ¶
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 ¶
Portal - portal with geographic coordinates in s2.Point format
func CobwebPolyline ¶
func DeepestHomogeneous ¶
func DeepestHomogeneous(portals []Portal, options ...HomogeneousOption) ([]Portal, uint16)
DeepestHomogeneous - Find deepest homogeneous field that can be made out of portals
func HerringbonePolyline ¶
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 ¶
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 ¶
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
Source Files ¶
- cobweb.go
- common.go
- double_herringbone.go
- double_herringbone_mt.go
- drone_flight.go
- drone_flight_mt.go
- drone_flight_options.go
- fifo.go
- flip_field.go
- flip_field_mt.go
- flip_field_options.go
- geo.go
- herringbone.go
- herringbone_mt.go
- homogeneous.go
- homogeneous2.go
- homogeneous2_scorers.go
- homogeneous2_utils.go
- homogeneous_options.go
- homogeneous_pure.go
- homogeneous_pure_scorers.go
- homogeneous_scorers.go
- portal.go
- three_corners.go