* - direction: one of Direction.IN, direction.OUT, or Direction.ANY.
* - Direction.IN finds neigbhors where root is the destination of the
* edge.
* - Direction.OUT finds neigbhors where root is the source of the edge.
* - Direction.ANY finds neigbhors where root is the source or destination
* of the edge.
*
if (edge.src === target) {
relevantEdgeWeight += weightedEdge.weight.froWeight;
}
if (edge.dst === target) {
relevantEdgeWeight += weightedEdge.weight.toWeight;
}
assuming that you're asking for a node's incoming neighbors ...
what if you are asking for outgoing?
=> signature of graph.neighbors
*_neighbors(
node: NodeAddressT,
options: NeighborsOptions,
initialModificationCount: ModificationCount
):
this.totalOutWeight(node); => shouldn't this be target ?
-
hot take:
-
called 'nodes' 'scoredNodes'
-
call edges 'weightedEdges'
-
I thought outweights were normalized by the markov chain distr. bc they were a prob distribution => or is that the total score going out of the node?
-
nit: refer to "Neighbors from graph" to this as "graph.neighbors"