class LinkManagerImpl extends LinkManager
- Source
- LinkManager.scala
- Alphabetic
- By Inheritance
- LinkManagerImpl
- LinkManager
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LinkManagerImpl(world: World, linkFactory: LinkFactory)
Value Members
-
def
addLink(link: Link): Unit
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
checkBreededCompatibility(unbreeded: Boolean): Boolean
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
cleanupLink(link: Link): Unit
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
cleanupTurtle(turtle: Turtle): Unit
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
createLink(src: Turtle, dest: Turtle, linkBreed: AgentSet): Link
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
getLink(src: Turtle, dest: Turtle, linkBreed: AgentSet): Option[Link]
Gets a specific link for the given turtles and link breed.
Gets a specific link for the given turtles and link breed. Note that unlike the other methods in this class, if
world.links
is given as the breed, *only* an unbreeded link can be found. Thus, there can only be a single matching link. If the breed is undirected,src
anddest
are interchangeable.- Definition Classes
- LinkManagerImpl → LinkManager
-
def
inLinks(target: Turtle, linkBreed: AgentSet): Array[Link]
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
inNeighbors(target: Turtle, linkBreed: AgentSet): Array[Turtle]
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
links(turtle: Turtle, linkBreed: AgentSet): Array[Link]
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
linksTo(src: Turtle, dest: Turtle, linkBreed: AgentSet): Array[Link]
Gets all links going from
src
todest
of the given breed.Gets all links going from
src
todest
of the given breed. Thus, directed, outgoing links fromsrc
todest
as well as undirected links connecting them will be included. Ifworld.links
is given as the breed, *all* such links will be returned, regardless of breed. Note that nolinksFrom
is provided as you can simply reverse the arguments to this method.- Definition Classes
- LinkManagerImpl → LinkManager
-
def
linksWith(src: Turtle, dest: Turtle, linkBreed: AgentSet): Array[Link]
Gets all links that connect the two turtles with the given link breed.
Gets all links that connect the two turtles with the given link breed. If
world.links
is given as the breed, *all* links connecting the two turtles will be returned, regardless of breed. This method ignores the directedness and direction of links. Because link direction is ignored,src
anddest
are interchangeable.- Definition Classes
- LinkManagerImpl → LinkManager
-
def
neighbors(turtle: Turtle, linkBreed: AgentSet): Array[Turtle]
- Definition Classes
- LinkManagerImpl → LinkManager
- def otherEnds(turtle: Turtle, links: Array[Link], linkBreed: AgentSet): Array[Turtle]
-
def
outLinks(src: Turtle, linkBreed: AgentSet): Array[Link]
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
outNeighbors(src: Turtle, linkBreed: AgentSet): Array[Turtle]
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
removeLink(link: Link): Unit
- Definition Classes
- LinkManagerImpl → LinkManager
-
def
reset(): Unit
- Definition Classes
- LinkManagerImpl → LinkManager