Documentation
¶
Index ¶
- Constants
- Variables
- func CalculatePredictedSize(growthType m3point.GrowthType, d int) int
- func GetConnectionMaskValue(connectionMask uint16, connIdx int) uint16
- func SetConnectionState(connectionMask uint16, connIdx int, state ConnectionState) uint16
- type ConnectionState
- type ConnectionStateIfc
- type PathContext
- type PathContextId
- type PathNode
- type PathNodeId
- type PathPackDataIfc
- type PathPoint
- type PathPointMap
- type PointId
Constants ¶
View Source
const ( ConnectionMaskBits = 4 ConnectionStateMask = uint16(0x0003) SingleConnectionMask = uint16(0x000F) )
View Source
const ( NewPathNodeId m3point.Int64Id = -1 InPoolId m3point.Int64Id = -2 LinkIdNotSet m3point.Int64Id = -3 DeadEndId m3point.Int64Id = -4 NextLinkIdNotAssigned m3point.Int64Id = -5 )
View Source
const NbConnections = 3
Variables ¶
View Source
var Log = m3util.NewLogger("m3path", m3util.INFO)
View Source
var NilPathPoint = PathPoint{ Id: NilPointId, P: m3point.Origin, }
Functions ¶
func CalculatePredictedSize ¶
func CalculatePredictedSize(growthType m3point.GrowthType, d int) int
func GetConnectionMaskValue ¶
func SetConnectionState ¶
func SetConnectionState(connectionMask uint16, connIdx int, state ConnectionState) uint16
Types ¶
type ConnectionState ¶
type ConnectionState uint16
const ( ConnectionNotSet ConnectionState = 0x0000 ConnectionFrom ConnectionState = 0x0001 ConnectionNext ConnectionState = 0x0002 ConnectionBlocked ConnectionState = 0x0003 )
func GetConnectionState ¶
func GetConnectionState(connectionMask uint16, connIdx int) ConnectionState
type ConnectionStateIfc ¶
type PathContext ¶
type PathContext interface { fmt.Stringer GetId() PathContextId GetGrowthCtx() m3point.GrowthContext GetGrowthType() m3point.GrowthType GetGrowthIndex() int GetGrowthOffset() int GetRootPathNode() PathNode GetMaxDist() int RequestNewMaxDist(requestDist int) error GetNumberOfNodesAt(dist int) int GetPathNodesAt(dist int) ([]PathNode, error) GetNumberOfNodesBetween(fromDist int, toDist int) int GetPathNodesBetween(fromDist, toDist int) ([]PathNode, error) DumpInfo() string }
type PathContextId ¶
func (PathContextId) MurmurHash ¶
func (id PathContextId) MurmurHash() uint32
type PathNode ¶
type PathNode interface { fmt.Stringer ConnectionStateIfc GetId() PathNodeId GetPathContext() PathContext IsRoot() bool P() m3point.Point D() int }
type PathNodeId ¶
func (PathNodeId) MurmurHash ¶
func (id PathNodeId) MurmurHash() uint32
type PathPackDataIfc ¶
type PathPackDataIfc interface { m3util.QsmDataPack GetPathCtx(id PathContextId) PathContext GetPathCtxFromAttributes(growthType m3point.GrowthType, growthIndex int, growthOffset int) (PathContext, error) }
type PathPointMap ¶
type PathPointMap struct {
// contains filtered or unexported fields
}
func MakePathPointMap ¶
func MakePathPointMap(initSize int) *PathPointMap
func (*PathPointMap) AddToMap ¶
func (ppm *PathPointMap) AddToMap(pointId PointId, point m3point.Point) *PathPoint
func (*PathPointMap) GetByPoint ¶
func (ppm *PathPointMap) GetByPoint(point m3point.Point) (*PathPoint, bool)
Click to show internal directories.
Click to hide internal directories.