Documentation
¶
Index ¶
Constants ¶
View Source
const EdgeTimeout = time.Duration(30 * time.Second)
View Source
const MaxNodes = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
ObjectiveFunction string
Destination int
Edges [MaxNodes][MaxNodes]time.Time
// contains filtered or unexported fields
}
func (*Graph) FormsLoop ¶
* Works by trying to find a path from 'to' to 'from', if that exists we would have a loop by adding 'from' to 'to' * edge.
func (*Graph) ReleaseEdge ¶
type GraphManager ¶
type GraphManager struct {
Graphs map[string]map[int]*Graph // ObjectiveFunction -> Destination -> Graph
}
func NewGraphManager ¶
func NewGraphManager() *GraphManager
func (*GraphManager) GetGraph ¶
func (gm *GraphManager) GetGraph(objectiveFunction string, destination int) *Graph
func (*GraphManager) ReleaseEdge ¶
func (gm *GraphManager) ReleaseEdge(objectiveFunction string, destination int, from int, to int)
func (*GraphManager) RequestEdge ¶
type NetworkManager ¶
func NewNetworkManager ¶
func NewNetworkManager() *NetworkManager
func (*NetworkManager) GetGraphManager ¶
func (nm *NetworkManager) GetGraphManager(networkId string) *GraphManager
Click to show internal directories.
Click to hide internal directories.