in-<breed>-neighbor? in-link-neighbor?4.0

in-<breed>-neighbor? agent in-link-neighbor? turtle Turtle Command

Reports true if there is a directed link going from turtle to the caller or an undirected link connecting turtle to the caller. You can think of this as "is there a link I can use to get from turtle to the caller?"

crt 2
ask turtle 0 [
  create-link-to turtle 1
  show in-link-neighbor? turtle 1  ;; prints false
  show out-link-neighbor? turtle 1 ;; prints true
]
ask turtle 1 [
  show in-link-neighbor? turtle 0  ;; prints true
  show out-link-neighbor? turtle 0 ;; prints false
]

Take me to the full NetLogo Dictionary