Documentation ¶
Index ¶
- Constants
- Variables
- func GetAllBaseTrio() [8]trio
- func GetMiddleEdgeIndex(ud1 m3point.UnitDirection, ud2 m3point.UnitDirection) int
- func GetNonBaseConnections(tA, tB trio) [6]m3point.Point
- func GetPointDbCleanEnv(envId m3util.QsmEnvID) *m3db.QsmDbEnvironment
- func GetPointDbFullEnv(envId m3util.QsmEnvID) *m3db.QsmDbEnvironment
- func IsLessConnId(cd1, cd2 *m3point.ConnectionDetails) bool
- func MakeVector(p1, p2 m3point.Point) m3point.Point
- type BasePathNodeBuilder
- type ByConnId
- type ByConnVector
- type CubeKeyId
- type CubeListBuilder
- type CubeOfTrioIndex
- func (cube CubeOfTrioIndex) GetCenter() m3point.TrioIndex
- func (cube CubeOfTrioIndex) GetCenterFaceTrio(ud m3point.UnitDirection) m3point.TrioIndex
- func (cube CubeOfTrioIndex) GetCenterFaces() [6]m3point.TrioIndex
- func (cube CubeOfTrioIndex) GetMiddleEdgeTrio(ud1 m3point.UnitDirection, ud2 m3point.UnitDirection) m3point.TrioIndex
- func (cube CubeOfTrioIndex) GetMiddleEdges() [12]m3point.TrioIndex
- func (cube CubeOfTrioIndex) String() string
- type IntermediatePathNodeBuilder
- func (ipnb *IntermediatePathNodeBuilder) DumpInfo() string
- func (ipnb *IntermediatePathNodeBuilder) GetNextPathNodeBuilder(from m3point.Point, connId m3point.ConnectionId, offset int) (PathNodeBuilder, m3point.Point, error)
- func (ipnb *IntermediatePathNodeBuilder) GetPathLinks() []PathLinkBuilder
- func (ipnb *IntermediatePathNodeBuilder) String() string
- func (ipnb *IntermediatePathNodeBuilder) Verify()
- type LastPathNodeBuilder
- func (lipnb *LastPathNodeBuilder) DumpInfo() string
- func (lipnb *LastPathNodeBuilder) GetNextInterConnId() m3point.ConnectionId
- func (lipnb *LastPathNodeBuilder) GetNextMainConnId() m3point.ConnectionId
- func (lipnb *LastPathNodeBuilder) GetNextPathNodeBuilder(from m3point.Point, connId m3point.ConnectionId, offset int) (PathNodeBuilder, m3point.Point, error)
- func (lipnb *LastPathNodeBuilder) String() string
- func (lipnb *LastPathNodeBuilder) Verify()
- type NextMainPathNode
- type PathBuilderContext
- type PathLinkBuilder
- type PathNodeBuilder
- type RootPathNodeBuilder
- func (rpnb *RootPathNodeBuilder) DumpInfo() string
- func (rpnb *RootPathNodeBuilder) GetNextPathNodeBuilder(from m3point.Point, connId m3point.ConnectionId, offset int) (PathNodeBuilder, m3point.Point, error)
- func (rpnb *RootPathNodeBuilder) GetPathLinks() []PathLinkBuilder
- func (rpnb *RootPathNodeBuilder) String() string
- func (rpnb *RootPathNodeBuilder) Verify()
- type ServerPointPackData
- func (pointData *ServerPointPackData) CheckCubesInitialized()
- func (pointData *ServerPointPackData) CheckPathBuildersInitialized()
- func (pointData *ServerPointPackData) FillDb()
- func (pointData *ServerPointPackData) GetAllMod4Permutations() [12][4]m3point.TrioIndex
- func (pointData *ServerPointPackData) GetAllMod8Permutations() [12][8]m3point.TrioIndex
- func (pointData *ServerPointPackData) GetCubeById(cubeId int) CubeKeyId
- func (pointData *ServerPointPackData) GetCubeIdByKey(cubeKey CubeKeyId) int
- func (pointData *ServerPointPackData) GetNbPathBuilders() int
- func (pointData *ServerPointPackData) GetPathNodeBuilder(growthCtx m3point.GrowthContext, offset int, c m3point.Point) PathNodeBuilder
- func (pointData *ServerPointPackData) GetRootPathNodeBuilderById(cubeId int) PathNodeBuilder
- func (pointData *ServerPointPackData) GetValidNextTrio() [12][2]m3point.TrioIndex
- func (pointData *ServerPointPackData) InitializeAll()
- func (pointData *ServerPointPackData) Populate(rpnb *RootPathNodeBuilder)
- func (pointData *ServerPointPackData) ResetFlags()
- type TrioDetailList
- func (l *TrioDetailList) ExistsById(tr *m3point.TrioDetails) bool
- func (l *TrioDetailList) ExistsByTrio(tr *m3point.TrioDetails) bool
- func (l *TrioDetailList) IdList() []m3point.TrioIndex
- func (l TrioDetailList) Len() int
- func (l TrioDetailList) Less(i, j int) bool
- func (l TrioDetailList) Swap(i, j int)
- type TrioIndexPermBuilder
Constants ¶
View Source
const ( ConnectionDetailsTable = "connection_details" TrioDetailsTable = "trio_details" )
View Source
const ( RootPathBuilder = iota IntermediatePathBuilder1 IntermediatePathBuilder2 IntermediatePathBuilder3 LastPathBuilder11 LastPathBuilder12 LastPathBuilder21 LastPathBuilder22 LastPathBuilder31 LastPathBuilder32 )
View Source
const (
GrowthContextsTable = "growth_contexts"
)
View Source
const NbPathBuildersPerContext = 10
View Source
const (
PathBuildersTable = "path_builders"
)
View Source
const (
TotalNumberOfCubes = 5192
)
View Source
const (
TrioCubesTable = "trio_cubes"
)
Variables ¶
View Source
var Log = m3util.NewLogger("pointdb", m3util.INFO)
View Source
var Origin = m3point.Point{0, 0, 0}
View Source
var XFirst = m3point.Point{m3point.THREE, 0, 0}
View Source
var YFirst = m3point.Point{0, m3point.THREE, 0}
View Source
var ZFirst = m3point.Point{0, 0, m3point.THREE}
Functions ¶
func GetAllBaseTrio ¶
func GetAllBaseTrio() [8]trio
func GetMiddleEdgeIndex ¶
func GetMiddleEdgeIndex(ud1 m3point.UnitDirection, ud2 m3point.UnitDirection) int
func GetNonBaseConnections ¶
Return the 6 connections possible +X, -X, +Y, -Y, +Z, -Z vectors between 2 trio
func GetPointDbCleanEnv ¶
func GetPointDbCleanEnv(envId m3util.QsmEnvID) *m3db.QsmDbEnvironment
Do not use this environment to load
func GetPointDbFullEnv ¶
func GetPointDbFullEnv(envId m3util.QsmEnvID) *m3db.QsmDbEnvironment
func IsLessConnId ¶
func IsLessConnId(cd1, cd2 *m3point.ConnectionDetails) bool
Types ¶
type BasePathNodeBuilder ¶
type BasePathNodeBuilder struct { Ctx *PathBuilderContext TrIdx m3point.TrioIndex }
func (*BasePathNodeBuilder) GetCubeId ¶
func (pnb *BasePathNodeBuilder) GetCubeId() int
func (*BasePathNodeBuilder) GetEnv ¶
func (pnb *BasePathNodeBuilder) GetEnv() m3util.QsmEnvironment
func (*BasePathNodeBuilder) GetPathBuilderByIndex ¶
func (pnb *BasePathNodeBuilder) GetPathBuilderByIndex(pbIdx int) PathNodeBuilder
func (*BasePathNodeBuilder) GetTrioIndex ¶
func (pnb *BasePathNodeBuilder) GetTrioIndex() m3point.TrioIndex
type ByConnId ¶
type ByConnId []*m3point.ConnectionDetails
type ByConnVector ¶
type ByConnVector []*m3point.ConnectionDetails
func (ByConnVector) Len ¶
func (cds ByConnVector) Len() int
func (ByConnVector) Less ¶
func (cds ByConnVector) Less(i, j int) bool
func (ByConnVector) Swap ¶
func (cds ByConnVector) Swap(i, j int)
type CubeKeyId ¶
type CubeKeyId struct { GrowthCtxId int Cube CubeOfTrioIndex }
func (CubeKeyId) GetCube ¶
func (c CubeKeyId) GetCube() CubeOfTrioIndex
func (CubeKeyId) GetGrowthCtxId ¶
type CubeListBuilder ¶
type CubeListBuilder struct {
// contains filtered or unexported fields
}
type CubeOfTrioIndex ¶
type CubeOfTrioIndex struct { // Index of cube center Center m3point.TrioIndex // Indexes of center of cube face ordered by +X, -X, +Y, -Y, +Z, -Z CenterFaces [6]m3point.TrioIndex // Indexes of middle of edges of the cube ordered by +X+Y, +X-Y, +X+Z, +X-Z, -X+Y, -X-Y, -X+Z, -X-Z, +Y+Z, +Y-Z, -Y+Z, -Y-Z MiddleEdges [12]m3point.TrioIndex }
func CreateTrioCube ¶
func CreateTrioCube(ppd *ServerPointPackData, growthCtx m3point.GrowthContext, offset int, c m3point.Point) CubeOfTrioIndex
Fill all the indexes assuming the distance of c from origin used in div by three
func (CubeOfTrioIndex) GetCenter ¶
func (cube CubeOfTrioIndex) GetCenter() m3point.TrioIndex
func (CubeOfTrioIndex) GetCenterFaceTrio ¶
func (cube CubeOfTrioIndex) GetCenterFaceTrio(ud m3point.UnitDirection) m3point.TrioIndex
func (CubeOfTrioIndex) GetCenterFaces ¶
func (cube CubeOfTrioIndex) GetCenterFaces() [6]m3point.TrioIndex
func (CubeOfTrioIndex) GetMiddleEdgeTrio ¶
func (cube CubeOfTrioIndex) GetMiddleEdgeTrio(ud1 m3point.UnitDirection, ud2 m3point.UnitDirection) m3point.TrioIndex
func (CubeOfTrioIndex) GetMiddleEdges ¶
func (cube CubeOfTrioIndex) GetMiddleEdges() [12]m3point.TrioIndex
func (CubeOfTrioIndex) String ¶
func (cube CubeOfTrioIndex) String() string
type IntermediatePathNodeBuilder ¶
type IntermediatePathNodeBuilder struct { BasePathNodeBuilder PathLinks [2]PathLinkBuilder }
func (*IntermediatePathNodeBuilder) DumpInfo ¶
func (ipnb *IntermediatePathNodeBuilder) DumpInfo() string
func (*IntermediatePathNodeBuilder) GetNextPathNodeBuilder ¶
func (ipnb *IntermediatePathNodeBuilder) GetNextPathNodeBuilder(from m3point.Point, connId m3point.ConnectionId, offset int) (PathNodeBuilder, m3point.Point, error)
func (*IntermediatePathNodeBuilder) GetPathLinks ¶
func (ipnb *IntermediatePathNodeBuilder) GetPathLinks() []PathLinkBuilder
func (*IntermediatePathNodeBuilder) String ¶
func (ipnb *IntermediatePathNodeBuilder) String() string
func (*IntermediatePathNodeBuilder) Verify ¶
func (ipnb *IntermediatePathNodeBuilder) Verify()
type LastPathNodeBuilder ¶
type LastPathNodeBuilder struct { BasePathNodeBuilder NextMainConnId m3point.ConnectionId NextInterConnId m3point.ConnectionId }
func (*LastPathNodeBuilder) DumpInfo ¶
func (lipnb *LastPathNodeBuilder) DumpInfo() string
func (*LastPathNodeBuilder) GetNextInterConnId ¶
func (lipnb *LastPathNodeBuilder) GetNextInterConnId() m3point.ConnectionId
func (*LastPathNodeBuilder) GetNextMainConnId ¶
func (lipnb *LastPathNodeBuilder) GetNextMainConnId() m3point.ConnectionId
func (*LastPathNodeBuilder) GetNextPathNodeBuilder ¶
func (lipnb *LastPathNodeBuilder) GetNextPathNodeBuilder(from m3point.Point, connId m3point.ConnectionId, offset int) (PathNodeBuilder, m3point.Point, error)
func (*LastPathNodeBuilder) String ¶
func (lipnb *LastPathNodeBuilder) String() string
func (*LastPathNodeBuilder) Verify ¶
func (lipnb *LastPathNodeBuilder) Verify()
type NextMainPathNode ¶
type NextMainPathNode struct { Ud m3point.UnitDirection Lip m3point.Point BackConn *m3point.ConnectionDetails Lipnb *LastPathNodeBuilder }
type PathBuilderContext ¶
type PathBuilderContext struct { GrowthCtx m3point.GrowthContext CubeId int PathBuilders [NbPathBuildersPerContext]PathNodeBuilder }
The Ctx for each main point start point that gives in the global map the root path node builder
func (*PathBuilderContext) GetPathBuilderByIndex ¶
func (ctx *PathBuilderContext) GetPathBuilderByIndex(pbIdx int) PathNodeBuilder
func (*PathBuilderContext) String ¶
func (ctx *PathBuilderContext) String() string
type PathLinkBuilder ¶
type PathLinkBuilder struct { ConnId m3point.ConnectionId PathNode PathNodeBuilder }
func (*PathLinkBuilder) GetConnectionId ¶
func (pl *PathLinkBuilder) GetConnectionId() m3point.ConnectionId
func (*PathLinkBuilder) GetPathNodeBuilder ¶
func (pl *PathLinkBuilder) GetPathNodeBuilder() PathNodeBuilder
type PathNodeBuilder ¶
type PathNodeBuilder interface { fmt.Stringer GetEnv() m3util.QsmEnvironment GetCubeId() int GetTrioIndex() m3point.TrioIndex GetNextPathNodeBuilder(from m3point.Point, connId m3point.ConnectionId, offset int) (PathNodeBuilder, m3point.Point, error) GetPathBuilderByIndex(pbIdx int) PathNodeBuilder DumpInfo() string Verify() }
type RootPathNodeBuilder ¶
type RootPathNodeBuilder struct { BasePathNodeBuilder PathLinks [3]PathLinkBuilder }
func (*RootPathNodeBuilder) DumpInfo ¶
func (rpnb *RootPathNodeBuilder) DumpInfo() string
func (*RootPathNodeBuilder) GetNextPathNodeBuilder ¶
func (rpnb *RootPathNodeBuilder) GetNextPathNodeBuilder(from m3point.Point, connId m3point.ConnectionId, offset int) (PathNodeBuilder, m3point.Point, error)
func (*RootPathNodeBuilder) GetPathLinks ¶
func (rpnb *RootPathNodeBuilder) GetPathLinks() []PathLinkBuilder
func (*RootPathNodeBuilder) String ¶
func (rpnb *RootPathNodeBuilder) String() string
func (*RootPathNodeBuilder) Verify ¶
func (rpnb *RootPathNodeBuilder) Verify()
type ServerPointPackData ¶
type ServerPointPackData struct { m3point.BasePointPackData // contains filtered or unexported fields }
func GetServerPointPackData ¶
func GetServerPointPackData(env m3util.QsmEnvironment) *ServerPointPackData
func (*ServerPointPackData) CheckCubesInitialized ¶
func (pointData *ServerPointPackData) CheckCubesInitialized()
func (*ServerPointPackData) CheckPathBuildersInitialized ¶
func (pointData *ServerPointPackData) CheckPathBuildersInitialized()
func (*ServerPointPackData) FillDb ¶
func (pointData *ServerPointPackData) FillDb()
func (*ServerPointPackData) GetAllMod4Permutations ¶
func (pointData *ServerPointPackData) GetAllMod4Permutations() [12][4]m3point.TrioIndex
func (*ServerPointPackData) GetAllMod8Permutations ¶
func (pointData *ServerPointPackData) GetAllMod8Permutations() [12][8]m3point.TrioIndex
func (*ServerPointPackData) GetCubeById ¶
func (pointData *ServerPointPackData) GetCubeById(cubeId int) CubeKeyId
func (*ServerPointPackData) GetCubeIdByKey ¶
func (pointData *ServerPointPackData) GetCubeIdByKey(cubeKey CubeKeyId) int
func (*ServerPointPackData) GetNbPathBuilders ¶
func (pointData *ServerPointPackData) GetNbPathBuilders() int
func (*ServerPointPackData) GetPathNodeBuilder ¶
func (pointData *ServerPointPackData) GetPathNodeBuilder(growthCtx m3point.GrowthContext, offset int, c m3point.Point) PathNodeBuilder
func (*ServerPointPackData) GetRootPathNodeBuilderById ¶
func (pointData *ServerPointPackData) GetRootPathNodeBuilderById(cubeId int) PathNodeBuilder
func (*ServerPointPackData) GetValidNextTrio ¶
func (pointData *ServerPointPackData) GetValidNextTrio() [12][2]m3point.TrioIndex
func (*ServerPointPackData) InitializeAll ¶
func (pointData *ServerPointPackData) InitializeAll()
func (*ServerPointPackData) Populate ¶
func (pointData *ServerPointPackData) Populate(rpnb *RootPathNodeBuilder)
func (*ServerPointPackData) ResetFlags ¶
func (pointData *ServerPointPackData) ResetFlags()
type TrioDetailList ¶
type TrioDetailList []*m3point.TrioDetails
Defining a list type to manage uniqueness and ordering
func (*TrioDetailList) ExistsById ¶
func (l *TrioDetailList) ExistsById(tr *m3point.TrioDetails) bool
func (*TrioDetailList) ExistsByTrio ¶
func (l *TrioDetailList) ExistsByTrio(tr *m3point.TrioDetails) bool
func (*TrioDetailList) IdList ¶
func (l *TrioDetailList) IdList() []m3point.TrioIndex
func (TrioDetailList) Len ¶
func (l TrioDetailList) Len() int
func (TrioDetailList) Less ¶
func (l TrioDetailList) Less(i, j int) bool
func (TrioDetailList) Swap ¶
func (l TrioDetailList) Swap(i, j int)
type TrioIndexPermBuilder ¶
type TrioIndexPermBuilder struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.