Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjacentNodes ¶
type AdjacentNodes []map[int]struct{}
AdjacentNodes is a slice of N sets, each representing the nodes adjacent to the node at the index.
func LineNetworkConfig ¶
func LineNetworkConfig(n int) AdjacentNodes
func NewAdjacentNodes ¶
func NewAdjacentNodes(n int) AdjacentNodes
NewAdjacentNodes creates a new AdjacentNodes with N nodes with initially no connections.
func SmallWorldNetworkConfig ¶
func SmallWorldNetworkConfig(n int) AdjacentNodes
func (AdjacentNodes) Connect ¶
func (a AdjacentNodes) Connect(from, to int)
func (AdjacentNodes) ConnectRandomDirection ¶
func (a AdjacentNodes) ConnectRandomDirection(from, to int) bool
type NetworkConfigFn ¶
type NetworkConfigFn func(int) AdjacentNodes
NetworkConfigFn is a function that returns an AdjacentNodes for a given number of nodes.
Click to show internal directories.
Click to hide internal directories.