jumpweb

package
v0.0.0-...-edc8c87 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinates

type Coordinates struct {
	X float64
	Y float64
	Z float64
}

func (*Coordinates) DistanceFrom

func (c *Coordinates) DistanceFrom(c1 *Coordinates) float64

type PVertex

type PVertex *Vertex

type ReachabilityVector

type ReachabilityVector struct {
	Distance float64
	Path     []int
}

func (*ReachabilityVector) GetPositionInPath

func (v *ReachabilityVector) GetPositionInPath(indexToCheck int) int

func (*ReachabilityVector) SubstituteSubVector

func (v *ReachabilityVector) SubstituteSubVector(subvect []int) error

type Starmap

type Starmap struct {
	Name         string
	Stars        []*Vertex
	IdStarMap    map[int]*Vertex
	Reachability map[int]*ReachabilityVector
	IdIndexMap   map[int]int
	// contains filtered or unexported fields
}

func StarmapFromFile

func StarmapFromFile(filename string) (*Starmap, error)

func (*Starmap) AppendToPath

func (sm *Starmap) AppendToPath(pathIdx, idx int) error

func (*Starmap) BuildReachabilityMap

func (sm *Starmap) BuildReachabilityMap(idx int, isStartingNode bool)

func (*Starmap) CalculateNeighbors

func (sm *Starmap) CalculateNeighbors(mydist float64) error

func (*Starmap) MainBuildReachabilityMap

func (sm *Starmap) MainBuildReachabilityMap(idx int, isStartingNode bool)

func (*Starmap) SetDistanceToVector

func (s *Starmap) SetDistanceToVector(rv *ReachabilityVector, dist float64)

func (*Starmap) UpdateReachabilityVectorDistance

func (s *Starmap) UpdateReachabilityVectorDistance(i int) error

type Vertex

type Vertex struct {
	Coordinates
	Id           int
	Name         string
	Neighbors    []PVertex
	NeighborsIdx []int
	Visited      bool
	Reference    bool
	Distance     float64
}

func MakeVertex

func MakeVertex(newName string, newCoord Coordinates) Vertex

func VertexFromString

func VertexFromString(s string) (Vertex, error)

func (*Vertex) AddNeighbor

func (v *Vertex) AddNeighbor(v1 *Vertex, idx, idx1 int)

Jump to

Keyboard shortcuts

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